You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
awaitctx.EditResponseAsync(newDiscordWebhookBuilder().WithContent($"{Program.cfgjson.Emoji.Error} TQS mutes are not configured, so this command does nothing. Please contact the bot maintainer if this is unexpected."));
99
-
else
100
-
awaitctx.RespondAsync($"{Program.cfgjson.Emoji.Error} TQS mutes are not configured, so this command does nothing. Please contact the bot maintainer if this is unexpected.");
101
-
return;
102
-
}
103
-
104
-
// Only allow usage in #tech-support, #tech-support-forum, and their threads + #bot-commands
awaitctx.EditResponseAsync(newDiscordWebhookBuilder().WithContent($"{Program.cfgjson.Emoji.Error} This command can only be used in <#{Program.cfgjson.TechSupportChannel}>, <#{Program.cfgjson.SupportForumId}>, and threads in those channels!"));
113
-
else
114
-
awaitctx.RespondAsync($"{Program.cfgjson.Emoji.Error} This command can only be used in <#{Program.cfgjson.TechSupportChannel}>, <#{Program.cfgjson.SupportForumId}>, and threads in those channels!");
115
-
return;
116
-
}
117
-
118
-
// Check if the user is already muted; disallow TQS-mute if so
if(awaitProgram.redis.HashExistsAsync("mutes",targetUser.Id)||(targetMemberis not null&&(targetMember.Roles.Contains(mutedRole)||targetMember.Roles.Contains(tqsMutedRole))))
135
-
{
136
-
if(ctxisSlashCommandContext)
137
-
awaitctx.EditResponseAsync(newDiscordWebhookBuilder().WithContent($"{Program.cfgjson.Emoji.Error}{ctx.User.Mention}, that user is already muted."));
138
-
else
139
-
awaitctx.RespondAsync($"{Program.cfgjson.Emoji.Error}{ctx.User.Mention}, that user is already muted.");
140
-
return;
141
-
}
142
-
143
-
// Check if user to be muted is staff or TQS, and disallow if so
awaitctx.EditResponseAsync(newDiscordWebhookBuilder().WithContent($"{Program.cfgjson.Emoji.Error}{ctx.User.Mention}, you cannot mute other TQS or staff members."));
148
-
else
149
-
awaitctx.RespondAsync($"{Program.cfgjson.Emoji.Error}{ctx.User.Mention}, you cannot mute other TQS or staff members.");
publicasyncTaskTqsUnmuteCmd(CommandContextctx,[Parameter("user"),Description("The user you're trying to unmute.")]DiscordUsertargetUser,[Description("The reason for the unmute.")]stringreason)
awaitctx.EditResponseAsync(newDiscordWebhookBuilder().WithContent($"{Program.cfgjson.Emoji.Error} TQS mutes are not configured, so this command does nothing. Please contact the bot maintainer if this is unexpected."));
176
-
else
177
-
awaitctx.RespondAsync($"{Program.cfgjson.Emoji.Error} TQS mutes are not configured, so this command does nothing. Please contact the bot maintainer if this is unexpected.");
178
-
return;
179
-
}
180
-
181
-
// Only allow usage in #tech-support, #tech-support-forum, and their threads + #bot-commands
awaitctx.EditResponseAsync(newDiscordWebhookBuilder().WithContent($"{Program.cfgjson.Emoji.Error} This command can only be used in <#{Program.cfgjson.TechSupportChannel}>, <#{Program.cfgjson.SupportForumId}>, and threads in those channels!"));
190
-
else
191
-
awaitctx.RespondAsync($"{Program.cfgjson.Emoji.Error} This command can only be used in <#{Program.cfgjson.TechSupportChannel}>, <#{Program.cfgjson.SupportForumId}>, their threads, and <#{Program.cfgjson.BotCommandsChannel}>!");
awaitctx.EditResponseAsync($"{Program.cfgjson.Emoji.Error} That user doesn't appear to be in the server!");
210
-
else
211
-
awaitctx.RespondAsync($"{Program.cfgjson.Emoji.Error} That user doesn't appear to be in the server!");
212
-
return;
213
-
}
214
-
215
-
if(awaitProgram.redis.HashExistsAsync("mutes",targetUser.Id)&&targetMemberis not null&&targetMember.Roles.Contains(tqsMutedRole))
216
-
{
217
-
// If the member has a regular mute, leave the TQS mute alone (it's only a role now & it has no effect if they also have Muted); it will be removed when they are unmuted
218
-
if(targetMember.Roles.Contains(mutedRole))
219
-
{
220
-
if(ctxisSlashCommandContext)
221
-
awaitctx.EditResponseAsync($"{Program.cfgjson.Emoji.Error}{targetUser.Mention} has been muted by a Moderator! Their TQS Mute will be removed when the Moderator-issued mute expires.");
222
-
else
223
-
awaitctx.RespondAsync($"{Program.cfgjson.Emoji.Error}{targetUser.Mention} has been muted by a Moderator! Their TQS Mute will be removed when the Moderator-issued mute expires.");
0 commit comments