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

@@ -120,7 +120,7 @@ module.exports = class Command {
* @returns {Promise<Message>}
*/
async sendUsage(channel, alias) {
const settings = await channel.guild.settings;
const settings = await channel.guild.getSettings();
if (!alias) alias = this.name;
const prefix = settings.command_prefix;

View File

@@ -69,7 +69,7 @@ module.exports = class CommandManager {
async handle(message) {
if (message.author.bot) return; // ignore self and other bots
const settings = await message.guild.settings;
const settings = await message.guild.getSettings();
const i18n = this.client.i18n.getLocale(settings.locale);
let is_blacklisted = false;

View File

@@ -80,7 +80,7 @@ module.exports = class TicketManager extends EventEmitter {
});
(async () => {
const settings = await guild.settings;
const settings = await guild.getSettings();
const i18n = this.client.i18n.getLocale(settings.locale);
topic = t_row.topic
@@ -218,7 +218,7 @@ module.exports = class TicketManager extends EventEmitter {
this.emit('beforeClose', ticket_id);
const guild = this.client.guilds.cache.get(t_row.guild);
const settings = await guild.settings;
const settings = await guild.getSettings();
const i18n = this.client.i18n.getLocale(settings.locale);
const channel = await this.client.channels.fetch(t_row.id);