public async Task UnbanAsync([Description("Member to unban")] SkeletonUser target, [Description("Reason of the unban")][Remainder] string reason = null) { try { await Context.Guild.UnbanMemberAsync(target.Id, reason ?? "Not specified."); await SimpleEmbedAsync($"{target.FormatUser()} has been unbanned from this guild. Reason: {reason ?? "Not specified."}"); } catch (NotFoundException) { await SimpleEmbedAsync($"{target.FormatUser()} is not banned yet."); } }
public async Task HackbanAsync(SkeletonUser target, [Description("Reason of the ban.")][Remainder] string reason = null) { if (Context.Guild.Members.Any(x => x.Id == target.Id)) { throw new FoxException($"You can't hackban that target because they're on this guild. Please use `{Context.Prefix}ban <target> [reason]` instead."); } await Context.Guild.BanMemberAsync(target.Id, 7, reason); await SimpleEmbedAsync($"{target.FormatUser()} has been hackbanned from the guild. Reason: {reason ?? "Not specified."}"); }
public Task UserIdAsync([Remainder] SkeletonUser user = null) { user = user ?? new SkeletonUser(Context.User); return(RespondAsync($"Id of the user: `{user.FormatUser()}`: {user.Id}")); }