1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-04-29 10:39:53 +03:00

General code refactor (and a few breaking config changes)

This commit is contained in:
Octol1ttle 2022-11-12 00:59:11 +05:00
parent 0e144db2e2
commit 552c575dd2
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF
15 changed files with 1164 additions and 879 deletions

View file

@ -12,7 +12,7 @@ public sealed class ClearCommand : ICommand {
if (!cmd.HasPermission(GuildPermission.ManageMessages)) return;
var toDelete = cmd.GetNumberRange(cleanArgs, 0, 1, 200, "ClearAmount");
if (toDelete == null) return;
if (toDelete is null) return;
var messages = await channel.GetMessagesAsync((int)(toDelete + 1)).FlattenAsync();
var user = (SocketGuildUser)cmd.Context.User;