1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-04-29 18:49: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

@ -9,11 +9,9 @@ public sealed class UnbanCommand : ICommand {
if (!cmd.HasPermission(GuildPermission.BanMembers)) return;
var id = cmd.GetBan(args, 0);
if (id == null) return;
if (id is null) return;
var reason = cmd.GetRemaining(args, 1, "UnbanReason");
if (reason == null) return;
await UnbanUserAsync(cmd, id.Value, reason);
if (reason is not null) await UnbanUserAsync(cmd, id.Value, reason);
}
public static async Task UnbanUserAsync(CommandProcessor cmd, ulong id, string reason) {