Fix settings

This commit is contained in:
Isaac
2021-05-21 21:15:54 +01:00
parent 3918bc136c
commit 777719d1b3
21 changed files with 24 additions and 23 deletions

View File

@@ -34,7 +34,7 @@ module.exports = class AddCommand extends Command {
* @returns {Promise<void|any>}
*/
async execute(message, args) {
const settings = await message.guild.settings;
const settings = await message.guild.getSettings();
const i18n = this.client.i18n.getLocale(settings.locale);
const ticket = message.mentions.channels.first() ?? message.channel;

View File

@@ -31,7 +31,7 @@ module.exports = class BlacklistCommand extends Command {
* @returns {Promise<void|any>}
*/
async execute(message, args) {
const settings = await message.guild.settings;
const settings = await message.guild.getSettings();
const i18n = this.client.i18n.getLocale(settings.locale);
const member = message.mentions.members.first();

View File

@@ -59,7 +59,7 @@ module.exports = class CloseCommand extends Command {
const arg_reason = this.args[1].name;
const arg_time = this.args[2].name;
const settings = await message.guild.settings;
const settings = await message.guild.getSettings();
const i18n = this.client.i18n.getLocale(settings.locale);
if (args[arg_time]) {

View File

@@ -31,7 +31,7 @@ module.exports = class HelpCommand extends Command {
* @returns {Promise<void|any>}
*/
async execute(message, args) {
const settings = await message.guild.settings;
const settings = await message.guild.getSettings();
const i18n = this.client.i18n.getLocale(settings.locale);
const cmd = this.manager.commands.find(command => command.aliases.includes(args.toLowerCase()));

View File

@@ -35,7 +35,7 @@ module.exports = class NewCommand extends Command {
* @returns {Promise<void|any>}
*/
async execute(message, args) {
const settings = await message.guild.settings;
const settings = await message.guild.getSettings();
const i18n = this.client.i18n.getLocale(settings.locale);
const editOrSend = async (msg, content) => {

View File

@@ -69,7 +69,7 @@ module.exports = class PanelCommand extends Command {
const arg_emoji = this.args[2].name;
const arg_categories = this.args[3].name;
const settings = await message.guild.settings;
const settings = await message.guild.getSettings();
const i18n = this.client.i18n.getLocale(settings.locale);
if (!args[arg_emoji])

View File

@@ -34,7 +34,7 @@ module.exports = class RemoveCommand extends Command {
* @returns {Promise<void|any>}
*/
async execute(message, args) {
const settings = await message.guild.settings;
const settings = await message.guild.getSettings();
const i18n = this.client.i18n.getLocale(settings.locale);
const ticket = message.mentions.channels.first() ?? message.channel;

View File

@@ -29,7 +29,7 @@ module.exports = class SettingsCommand extends Command {
* @returns {Promise<void|any>}
*/
async execute(message) {
const settings = await message.guild.settings;
const settings = await message.guild.getSettings();
const i18n = this.client.i18n.getLocale(settings.locale);
const attachments = [...message.attachments.values()];

View File

@@ -27,7 +27,7 @@ module.exports = class StatsCommand extends Command {
* @returns {Promise<void|any>}
*/
async execute(message) {
const settings = await message.guild.settings;
const settings = await message.guild.getSettings();
const i18n = this.client.i18n.getLocale(settings.locale);
const messages = await this.client.db.models.Message.findAndCountAll();

View File

@@ -34,7 +34,7 @@ module.exports = class SurveyCommand extends Command {
* @returns {Promise<void|any>}
*/
async execute(message, args) {
const settings = await message.guild.settings;
const settings = await message.guild.getSettings();
const i18n = this.client.i18n.getLocale(settings.locale);
const survey = await this.client.db.models.Survey.findOne({

View File

@@ -35,7 +35,7 @@ module.exports = class TagCommand extends Command {
* @returns {Promise<void|any>}
*/
async execute(message, args) {
const settings = await message.guild.settings;
const settings = await message.guild.getSettings();
const i18n = this.client.i18n.getLocale(settings.locale);
const t_row = await this.client.db.models.Ticket.findOne({

View File

@@ -28,7 +28,7 @@ module.exports = class TopicCommand extends Command {
* @returns {Promise<void|any>}
*/
async execute(message, args) {
const settings = await message.guild.settings;
const settings = await message.guild.getSettings();
const i18n = this.client.i18n.getLocale(settings.locale);
const t_row = await this.client.db.models.Ticket.findOne({