more command aliases

This commit is contained in:
13xforever 2018-08-14 22:04:07 +05:00 committed by Roberto Anić Banić
parent 9c38bee898
commit e479772d4c
3 changed files with 8 additions and 5 deletions

View File

@ -172,7 +172,7 @@ namespace CompatBot.Commands
}
[Command("remove"), Aliases("delete", "del"), RequiresBotModRole]
[Command("remove"), Aliases("delete", "del", "erase", "obliterate"), RequiresBotModRole]
[Description("Removes an explanation from the definition list")]
public async Task Remove(CommandContext ctx, [RemainingText, Description("Term to remove")] string term)
{

View File

@ -41,9 +41,9 @@ namespace CompatBot.Commands
}
}
[Command("restart"), Aliases("update"), TriggersTyping]
[Description("Restarts bot and pulls newest commit")]
public async Task Restart(CommandContext ctx)
[Command("update"), Aliases("upgrade", "restart", "reboot", "pull"), TriggersTyping]
[Description("Restarts bot and pulls the newest commit")]
public async Task Update(CommandContext ctx)
{
if (lockObj.Wait(0))
{

View File

@ -10,7 +10,10 @@ namespace CompatBot.EventHandlers
{
internal static class BotShutupHandler
{
private static readonly AhoCorasickDoubleArrayTrie<string> ChillCheck = new AhoCorasickDoubleArrayTrie<string>(new[] { "shut the fuck up", "shut up", "shutup", "hush", "chill" }.ToDictionary(s => s, s => s), true);
private static readonly AhoCorasickDoubleArrayTrie<string> ChillCheck = new AhoCorasickDoubleArrayTrie<string>(new[]
{
"shut the fuck up", "shut up", "shutup", "hush", "chill", "take that back", "delete this", "bad bot",
}.ToDictionary(s => s, s => s), true);
public static async Task OnMessageCreated(MessageCreateEventArgs args)
{