This commit is contained in:
parent
efd213d085
commit
c12644d537
3 changed files with 13 additions and 8 deletions
|
@ -14,12 +14,17 @@ export default class Ignore extends Command {
|
|||
|
||||
public override async execute(interaction: CommandInteraction) {
|
||||
if (!interaction.guildId) return;
|
||||
|
||||
|
||||
const isChannelIgnored = await IgnoredChannel.IsChannelIgnored(interaction.guildId);
|
||||
|
||||
|
||||
if (isChannelIgnored) {
|
||||
const entity = await IgnoredChannel.FetchOneById(IgnoredChannel, interaction.guildId);
|
||||
|
||||
|
||||
if (!entity) {
|
||||
await interaction.reply('Unable to find channel.');
|
||||
return;
|
||||
}
|
||||
|
||||
await IgnoredChannel.Remove(IgnoredChannel, entity);
|
||||
|
||||
await interaction.reply('This channel will start being logged again.');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue