1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-04-30 02:59:54 +03:00

Bugfixes:

- Do not call RemoveUnbanAsync in guild tick loop if the user is not banned
- Fix !clear message logs being reversed
- Do not process MessageReceivedEvents by webhooks

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
Octol1ttle 2023-02-14 23:17:20 +05:00
parent f6f5543972
commit 4cc00e01da
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF
4 changed files with 11 additions and 16 deletions

View file

@ -83,16 +83,14 @@ public static class EventHandler {
}
private static Task MessageReceivedEvent(IDeletable messageParam) {
if (messageParam is not SocketUserMessage message) return Task.CompletedTask;
if (messageParam is not SocketUserMessage message || message.Author.IsWebhook) return Task.CompletedTask;
_ = message.CleanContent.ToLower() switch {
"whoami" => message.ReplyAsync("`nobody`"),
"сука !!" => message.ReplyAsync("`root`"),
"воооо" => message.ReplyAsync("`removing /...`"),
"op ??" => message.ReplyAsync(
"некоторые пасхальные цитаты которые вы могли найти были легально взяты у <@573772175572729876>"),
"++++" => message.ReplyAsync("#"),
_ => new CommandProcessor(message).HandleCommandAsync()
"++++" => message.ReplyAsync("#"),
_ => new CommandProcessor(message).HandleCommandAsync()
};
return Task.CompletedTask;
}