Compare commits
3 commits
fa4236d8a1
...
99c889b82c
Author | SHA1 | Date | |
---|---|---|---|
99c889b82c | |||
7613aedbbe | |||
1c4fdd05f1 |
3 changed files with 18 additions and 4 deletions
|
@ -116,7 +116,7 @@ export default class Config extends Command {
|
||||||
const setting = server.Settings.filter(x => x.Key == key.value)[0];
|
const setting = server.Settings.filter(x => x.Key == key.value)[0];
|
||||||
|
|
||||||
if (setting) {
|
if (setting) {
|
||||||
await interaction.reply(`\`${key}\`: \`${setting.Value}\``);
|
await interaction.reply(`\`${key.value}\`: \`${setting.Value}\``);
|
||||||
} else {
|
} else {
|
||||||
var defaultValue = DefaultValues.GetValue(key.value.toString());
|
var defaultValue = DefaultValues.GetValue(key.value.toString());
|
||||||
|
|
||||||
|
@ -197,4 +197,4 @@ export default class Config extends Command {
|
||||||
|
|
||||||
await interaction.reply('Setting has been set.');
|
await interaction.reply('Setting has been set.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,14 @@ export default class Mute extends Command {
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const mutedRole = interaction.guild.roles.cache.find(role => role.name == process.env.ROLES_MUTED);
|
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);
|
||||||
|
|
||||||
if (!mutedRole) {
|
if (!mutedRole) {
|
||||||
await interaction.reply('Muted role not found.');
|
await interaction.reply('Muted role not found.');
|
||||||
|
|
|
@ -52,7 +52,14 @@ export default class Unmute extends Command {
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const mutedRole = interaction.guild.roles.cache.find(role => role.name == process.env.ROLES_MUTED);
|
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);
|
||||||
|
|
||||||
if (!mutedRole) {
|
if (!mutedRole) {
|
||||||
await interaction.reply('Muted role not found.');
|
await interaction.reply('Muted role not found.');
|
||||||
|
|
Loading…
Reference in a new issue