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:
parent
0e144db2e2
commit
552c575dd2
15 changed files with 1164 additions and 879 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue