Skip to content

Commit

Permalink
tqsmute: Allow usage in #bot-commands
Browse files Browse the repository at this point in the history
  • Loading branch information
FloatingMilkshake committed Mar 1, 2025
1 parent 2147716 commit 9cbb29c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Commands/MuteCmds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,12 @@ public async Task TqsMuteSlashCommand(
return;
}

// Only allow usage in #tech-support, #tech-support-forum, and their threads
// Only allow usage in #tech-support, #tech-support-forum, and their threads + #bot-commands
if (ctx.Channel.Id != Program.cfgjson.TechSupportChannel &&
ctx.Channel.Id != Program.cfgjson.SupportForumId &&
ctx.Channel.Parent.Id != Program.cfgjson.TechSupportChannel &&
ctx.Channel.Parent.Id != Program.cfgjson.SupportForumId)
ctx.Channel.Parent.Id != Program.cfgjson.SupportForumId &&
ctx.Channel.Id != Program.cfgjson.BotCommandsChannel)
{
if (ctx is SlashCommandContext)
await ctx.EditResponseAsync(new DiscordWebhookBuilder().WithContent($"{Program.cfgjson.Emoji.Error} This command can only be used in <#{Program.cfgjson.TechSupportChannel}>, <#{Program.cfgjson.SupportForumId}>, and threads in those channels!"));
Expand Down

0 comments on commit 9cbb29c

Please sign in to comment.