Пример #1
0
        public async Task Unlock()
        {
            if (Xml.CommandAllowed("unlock", Context))
            {
                await Context.Message.DeleteAsync();

                if (Moderation.IsModerator((IGuildUser)Context.Message.Author))
                {
                    Moderation.Unlock((SocketGuildUser)Context.User, (ITextChannel)Context.Channel);
                }
                else
                {
                    await Context.Channel.SendMessageAsync(UserSettings.BotOptions.GetString("NoPermissionMessage", Context.Guild.Id));
                }
            }
        }
Пример #2
0
        private void RadioButton_Unlocked_Click(object sender, EventArgs e)
        {
            SocketTextChannel channel = guilds[selectedServer].TextChannels.ToList()[selectedChannel];

            Moderation.Unlock(channel.Guild.CurrentUser, channel);
        }