Пример #1
0
        public async Task ClearWarns([Summary("The user whose warns to clear.")] SocketGuildUser mention)
        {
            if (Xml.CommandAllowed("clear warns", Context))
            {
                await Context.Message.DeleteAsync();

                if (Moderation.IsModerator((SocketGuildUser)Context.User))
                {
                    Moderation.ClearWarns((SocketGuildUser)Context.User, (ITextChannel)Context.Channel, mention);
                }
                else
                {
                    await Context.Channel.SendMessageAsync(UserSettings.BotOptions.GetString("NoPermissionMessage", Context.Guild.Id));
                }
            }
        }