diff --git a/src_modules/voice_commands/commands/EnableAutoJoinCommand.ts b/src_modules/voice_commands/commands/EnableAutoJoinCommand.ts index cd680db..8c6af03 100644 --- a/src_modules/voice_commands/commands/EnableAutoJoinCommand.ts +++ b/src_modules/voice_commands/commands/EnableAutoJoinCommand.ts @@ -21,12 +21,12 @@ export class EnableAutoJoinCommand extends Command<[]> { } public async execute(context: IExecutionContext<[]>) { - const guild = context.guild.guild; - + const guild = context.guild; + if (await this.voiceCommandsModule.autoJoinConfigEntry.guildGet(guild)) { return context.respond(autoJoinAlreadyEnabledPhrase, {}); } - + await this.voiceCommandsModule.autoJoinConfigEntry.guildSet(guild, true); return context.respond(autoJoinEnabledPhrase, {}); }