Beispiel #1
0
        public async Task Ban(IGuildUser userToBan, [Remainder] string reason = null)
        {
            if (_moderationService.GetPermLevel(Context, Context.GUser) <= _moderationService.GetPermLevel(Context, userToBan))
            {
                ReplyError("You cannot ban another mod with a permission level higher or equal to your own.");
            }

            await _moderationService.InformSubjectAsync(Context.User, "Ban", userToBan, reason);

            await Context.Guild.AddBanAsync(userToBan);

            await SendAsync($"{Context.User.Boldify()} has successfully banned {userToBan.Boldify()}.");

            await _moderationService.ModLogAsync(Context, "Ban", Config.ERROR_COLOR, reason, userToBan);
        }