mirror of
https://github.com/RPCS3/discord-bot.git
synced 2024-12-13 13:46:20 +00:00
parent
15ed3a64fe
commit
fd0a53056b
@ -255,6 +255,7 @@ namespace CompatBot.Commands
|
||||
var letterW = DiscordEmoji.FromUnicode("🇼");
|
||||
var letterM = DiscordEmoji.FromUnicode("🇲");
|
||||
var letterE = DiscordEmoji.FromUnicode("🇪");
|
||||
var letterU = DiscordEmoji.FromUnicode("🇺");
|
||||
|
||||
DiscordMessage msg = null;
|
||||
string errorMsg = null;
|
||||
@ -380,6 +381,7 @@ namespace CompatBot.Commands
|
||||
$"**`W`** = **`{FilterAction.IssueWarning}`** will issue a warning to the user.\n" +
|
||||
$"**`M`** = **`{FilterAction.SendMessage}`** send _a_ message with an explanation of why it was removed.\n" +
|
||||
$"**`E`** = **`{FilterAction.ShowExplain}`** show `explain` for the specified term (**not implemented**).\n" +
|
||||
$"**`U`** = **`{FilterAction.MuteModQueue}`** mute mod queue reporting for this action.\n" +
|
||||
"Reactions will toggle the action, text message will set the specified flags."
|
||||
);
|
||||
msg = await msg.UpdateOrCreateMessageAsync(ctx.Channel, "Please specify filter **action(s)**", embed: embed).ConfigureAwait(false);
|
||||
@ -419,6 +421,12 @@ namespace CompatBot.Commands
|
||||
filter.Actions ^= FilterAction.ShowExplain;
|
||||
goto step3;
|
||||
}
|
||||
|
||||
if (emoji.Emoji == letterU)
|
||||
{
|
||||
filter.Actions ^= FilterAction.MuteModQueue;
|
||||
goto step3;
|
||||
}
|
||||
}
|
||||
else if (txt != null)
|
||||
{
|
||||
@ -455,6 +463,12 @@ namespace CompatBot.Commands
|
||||
case "SENDEXPLAIN":
|
||||
newActions |= FilterAction.ShowExplain;
|
||||
break;
|
||||
case "U":
|
||||
case "MMQ":
|
||||
case "MUTE":
|
||||
case "MUTEMODQUEUE":
|
||||
newActions |= FilterAction.MuteModQueue;
|
||||
break;
|
||||
case "ABORT":
|
||||
return (false, msg);
|
||||
case "-":
|
||||
|
@ -95,6 +95,7 @@ namespace CompatBot.Database
|
||||
IssueWarning = 0b_0000_0010,
|
||||
ShowExplain = 0b_0000_0100,
|
||||
SendMessage = 0b_0000_1000,
|
||||
MuteModQueue = 0b_0001_0000,
|
||||
}
|
||||
|
||||
internal class Warning
|
||||
|
@ -167,7 +167,8 @@ namespace CompatBot.Database.Providers
|
||||
|
||||
try
|
||||
{
|
||||
await client.ReportAsync("🤬 Content filter hit", message, trigger.String, triggerContext ?? message.Content, severity, actionList).ConfigureAwait(false);
|
||||
if (!trigger.Actions.HasFlag(FilterAction.MuteModQueue) && !ignoreFlags.HasFlag(FilterAction.MuteModQueue))
|
||||
await client.ReportAsync("🤬 Content filter hit", message, trigger.String, triggerContext ?? message.Content, severity, actionList).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -14,6 +14,7 @@ namespace CompatBot.Utils.Extensions
|
||||
[FilterAction.IssueWarning] = 'w',
|
||||
[FilterAction.SendMessage] = 'm',
|
||||
[FilterAction.ShowExplain] = 'e',
|
||||
[FilterAction.MuteModQueue] = 'u',
|
||||
};
|
||||
|
||||
public static string ToFlagsString(this FilterAction flags)
|
||||
|
Loading…
Reference in New Issue
Block a user