diff --git a/src/commands/config.ts b/src/commands/config.ts index 07538ba..f816343 100644 --- a/src/commands/config.ts +++ b/src/commands/config.ts @@ -116,7 +116,7 @@ export default class Config extends Command { const setting = server.Settings.filter(x => x.Key == key.value)[0]; if (setting) { - await interaction.reply(`\`${key.value}\`: \`${setting.Value}\``); + await interaction.reply(`\`${key}\`: \`${setting.Value}\``); } else { var defaultValue = DefaultValues.GetValue(key.value.toString()); @@ -197,4 +197,4 @@ export default class Config extends Command { await interaction.reply('Setting has been set.'); } -} +} \ No newline at end of file diff --git a/src/commands/mute.ts b/src/commands/mute.ts index 41d466b..c012035 100644 --- a/src/commands/mute.ts +++ b/src/commands/mute.ts @@ -54,14 +54,7 @@ export default class Mute extends Command { }, ]); - const mutedRoleName = await SettingsHelper.GetSetting('role.muted', interaction.guildId); - - if (!mutedRoleName) { - await interaction.reply('Unable to find configuration. Please contact the bot author.'); - return; - } - - const mutedRole = interaction.guild.roles.cache.find(role => role.name == mutedRoleName); + const mutedRole = interaction.guild.roles.cache.find(role => role.name == process.env.ROLES_MUTED); if (!mutedRole) { await interaction.reply('Muted role not found.'); diff --git a/src/commands/unmute.ts b/src/commands/unmute.ts index 2d70154..7bbb943 100644 --- a/src/commands/unmute.ts +++ b/src/commands/unmute.ts @@ -52,14 +52,7 @@ export default class Unmute extends Command { }, ]); - const mutedRoleName = await SettingsHelper.GetSetting('role.muted', interaction.guildId); - - if (!mutedRoleName) { - await interaction.reply('Unable to find configuration. Please contact the bot author.'); - return; - } - - const mutedRole = interaction.guild.roles.cache.find(role => role.name == mutedRoleName); + const mutedRole = interaction.guild.roles.cache.find(role => role.name == process.env.ROLES_MUTED); if (!mutedRole) { await interaction.reply('Muted role not found.');