fix: problem caused by previous #250 fix

This commit is contained in:
Isaac 2021-10-26 20:27:42 +01:00
parent 410abcafe9
commit e38b66e4dd
No known key found for this signature in database
GPG Key ID: 87B9B6BD04EB7534
2 changed files with 1 additions and 2 deletions

View File

@ -17,8 +17,6 @@ module.exports = class InteractionCreateEventListener extends EventListener {
async execute(interaction) { async execute(interaction) {
this.client.log.debug(interaction); this.client.log.debug(interaction);
await interaction.deferReply();
const settings = await this.client.utils.getSettings(interaction.guild.id); const settings = await this.client.utils.getSettings(interaction.guild.id);
const i18n = this.client.i18n.getLocale(settings.locale); const i18n = this.client.i18n.getLocale(settings.locale);

View File

@ -148,6 +148,7 @@ module.exports = class CommandManager {
*/ */
async handle(interaction) { async handle(interaction) {
if (!interaction.guild) return this.client.log.debug('Ignoring non-guild command interaction'); if (!interaction.guild) return this.client.log.debug('Ignoring non-guild command interaction');
await interaction.deferReply();
const settings = await this.client.utils.getSettings(interaction.guild.id); const settings = await this.client.utils.getSettings(interaction.guild.id);
const i18n = this.client.i18n.getLocale(settings.locale); const i18n = this.client.i18n.getLocale(settings.locale);