コード例 #1
0
 public string ToString(GuildHandler guildHandler)
 {
     return($"Trigger: {Trigger}, " +
            "User: "******"Any" : guildHandler.GetUser(UserId).GetShownName()) + ", " +
            "Channel: " + (guildHandler.FindTextChannel(ChannelId) == null ? "Any" : guildHandler.FindTextChannel(ChannelId).Name) + ", " +
            $"Chance: {Math.Round(Chance, 2)}%, Response: {Response}, Emote: {Emoji}");
 }
コード例 #2
0
        public override void Initialize()
        {
            AssertPermission(GuildPermission.ManageChannels);

            _commandSet = new VoiceNameSet {
                ParentPlugin = this
            };
            GuildHandler.ChannelCreated        += OnChannelCreated;
            GuildHandler.ChannelDestroyed      += OnChannelDestroyed;
            GuildHandler.UserVoiceStateUpdated += OnVoiceStateUpdated;
            GuildHandler.GuildMemberUpdated    += OnGuildMemberUpdated;
            GuildHandler.ChannelUpdated        += OnChannelUpdated;
            InitDefaultTags();

            _channelNames = GetConfigCache("ChannelNames", x => x.GetGuild().VoiceChannels.ToDictionary(y => y.Id, z => z.Name));
            _channelNames.Store();

            _toIgnore = GetConfigCache("ToIgnore", x => new List <ulong> {
                (x.GetGuild().AFKChannel?.Id).GetValueOrDefault()
            });
            _musicBotId          = GetConfigCache("MusicBotId", x => (ulong)0);
            _internationalRoleId = GetConfigCache("MusicBotId", x => (ulong)0);
            _nameFormat          = GetConfigCache("NameFormat", x => $"{_formatStart}{_formatNameStr}{_formatEnd} - {_formatStart}{_formatGameStr}{_formatEnd} {_formatStart}({_formatAmountPlayersStr}){_formatEnd}"); // lol
            _shortenedGameNames  = GetConfigCache("ShortenedGameNames", x => new Dictionary <string, string>());

            AddConfigInfo("Set Channel Name", "Display channel names", () => "Current channel names:\n" + string.Join('\n', _channelNames.GetValue().Select(x => x.Value).ToArray()));
            AddConfigInfo <SocketVoiceChannel, string>("Set Channel Name", "Set channel name", (x, y) => _channelNames.MutateValue(z => z[x.Id] = y), (success, x, y) => $"Succesfully set channel '{x.Name}' to '{y}'", "Channel", "New name");
            AddConfigInfo <string, string>("Set Channel Name", "Set channel name", (x, y) => _channelNames.MutateValue(z => z[GuildHandler.GetVoiceChannel(x).Id] = y), (success, x, y) => "Succesfully set channel names.", "Channel", "New name");

            AddConfigInfo <SocketVoiceChannel>("Dont Name Channel", "Ignore channel", x => _toIgnore.MutateValue(y => y.Add(x.Id)), (success, x) => $"Added channel '{x.Name}' to list of ignored channels.", "Channel");
            AddConfigInfo <ulong>("Dont Name Channel", "Ignore channel", x => _toIgnore.MutateValue(y => y.Add(GuildHandler.GetVoiceChannel(x).Id)), (success, x) => $"Added channel '{GuildHandler.GetVoiceChannel (x).Name}' to list of ignored channels.", "ignored");
            AddConfigInfo <string>("Dont Name Channel", "Ignore channel", x => _toIgnore.MutateValue(y => y.Add(GuildHandler.GetVoiceChannel(x).Id)), (success, x) => $"Added channel '{GuildHandler.GetVoiceChannel(x).Name}' to list of ignored channels.", "Channel");

            AddConfigInfo <SocketVoiceChannel>("Do Name Channel", "Unignore channel", x => _toIgnore.MutateValue(y => y.Remove(x.Id)), (success, x) => $"Removed channel '{x.Name}' from list of ignored.", "Channel");
            AddConfigInfo <ulong>("Do Name Channel", "Unignore channel", x => _toIgnore.MutateValue(y => y.Remove(GuildHandler.GetVoiceChannel(x).Id)), (success, x) => $"Removed channel '{GuildHandler.GetChannel(x)}' from list of ignored.", "Channel");
            AddConfigInfo <string>("Do Name Channel", "Unignore channel", x => _toIgnore.MutateValue(y => y.Remove(GuildHandler.GetVoiceChannel(x).Id)), (success, x) => $"Removed channel '{GuildHandler.GetChannel(x)}' from list of ignored.", "Channel");

            AddConfigInfo <SocketGuildUser>("Set Music Bot", "Set music bot.", x => _musicBotId.SetValue(x.Id), (success, x) => $"Set music bot to be {x.Id}.", "Music Bot");
            AddConfigInfo <string>("Set Music Bot", "Set music bot.", x => _musicBotId.SetValue(GuildHandler.GetUser(x).Id), (success, x) => $"Set music bot to be {GuildHandler.GetUser(x).GetShownName()}.", "Music Bot");
            AddConfigInfo("Set Music Bot", "Show music bot.", () => GuildHandler.FindUser(_musicBotId.GetValue()) == null ? "Current music bot doesn't exist :(" : "Current music bot is " + GuildHandler.GetUser(_musicBotId.GetValue()).GetShownName());

            AddConfigInfo <SocketRole>("Set International Role", "Set role.", x => _internationalRoleId.SetValue(x.Id), (success, x) => $"Set international role to be {x}.", "Role");
            AddConfigInfo <string>("Set International Role", "Set role.", x => _internationalRoleId.SetValue(GuildHandler.GetRole(x).Id), (success, x) => $"Set international role to be {GuildHandler.GetRole(x).Name}.", "Role Name");
            AddConfigInfo("Set International Role", "Show role.", () => GuildHandler.FindRole(_internationalRoleId.GetValue()) == null ? "Current international role doesn't exist :(" : "Current international role is " + GuildHandler.GetRole(_internationalRoleId.GetValue()).Name);

            AddConfigInfo("Set Name Format", "Set format", () => $"Current format is '{_nameFormat.GetValue()}' which might look like this in practice: '{FormatName(_nameFormat.GetValue(), _formatStart, _formatEnd, "General 1", "Cool Game 3: The Coolest", 5)}'.");
            AddConfigInfo <string>("Set Name Format", "Set format", x => _nameFormat.SetValue(x), (success, x) => $"Set format to '{x}' which might look like this in practice: '{FormatName(x, _formatStart, _formatEnd, "General 1", "Cool Game 3: The Coolest", 5)}'.", "Format");

            AddConfigInfo <string, string>("Shorten Game Name", "Shorten a games name", (x, y) => SetShortenedGameName(x, y), (success, x, y) => $"'{x}' will now be shortened to '{y}'.", "Game", "Name");
            SendMessage("Moduthulhu-Command Root", "AddCommand", _commandSet);

            AddGeneralFeaturesStateAttribute("AutomatedVoiceNames", "Automatically changing voice channel names to reflect games played within.");

            RegisterMessageAction("AddTag", x => AddTag(new Tag((string)x[0], (string)x[1], (Func <SocketVoiceChannel, bool>)x[2])));
            RegisterMessageAction("RemoveTag", x => RemoveTag((string)x[0]));

            SetStateChangeHeaders("Tags", "The following voice channel tags has been added", "The following voice channel tags has been removed", "The following  voice channel tags has been modified");

            RegisterMessageAction("UpdateChannel", x => UpdateChannel(GuildHandler.GetVoiceChannel((ulong)x[0])).ConfigureAwait(false));
        }
コード例 #3
0
ファイル: KarmaCommands.cs プロジェクト: Lomztein/Moduthulhu
            private static EmbedFieldBuilder GetTopVoters(Func <int, int, int> comparer, ulong[] voters, string title, string type, string ifNone, int topCount, GuildHandler guildHandler)
            {
                var sorted = voters.Distinct().ToList();
                var dict   = sorted.ToDictionary(x => x, x => voters.Count(y => x == y)).ToList();

                dict.Sort(new Comparison <KeyValuePair <ulong, int> > ((x, y) => comparer(x.Value, y.Value)));

                int count     = sorted.Count();
                var voterList = dict.ToList().GetRange(0, Math.Min(count, topCount));

                StringBuilder top = new StringBuilder("```");

                foreach (var upvote in voterList)
                {
                    IUser  user = guildHandler.FindUser(upvote.Key);
                    string name = user == null ? "*User not found." : user.GetShownName();
                    top.AppendLine($"{name} - {upvote.Value} {type}.");
                }
                top.AppendLine("```");

                return(new EmbedFieldBuilder().WithName(title).WithValue(count == 0 ? ifNone : top.ToString()));
            }
コード例 #4
0
        private string GetSnowflakeName(ulong id)
        {
            IUser user = GuildHandler.FindUser(id);

            if (user != null)
            {
                return($"@{user.GetShownName ()}");
            }

            IChannel channel = GuildHandler.FindChannel(id);

            if (channel != null)
            {
                return($"#{channel.Name}");
            }

            IRole role = GuildHandler.FindRole(id);

            if (role != null)
            {
                return($"@{role.Name}");
            }
            return(id.ToString());
        }
コード例 #5
0
        public override void Initialize()
        {
            commandSet = new VoiceNameSet()
            {
                ParentPlugin = this
            };
            GuildHandler.ChannelCreated        += OnChannelCreated;
            GuildHandler.ChannelDestroyed      += OnChannelDestroyed;
            GuildHandler.UserVoiceStateUpdated += OnVoiceStateUpdated;
            GuildHandler.GuildMemberUpdated    += OnGuildMemberUpdated;
            InitDefaultTags();

            _channelNames = GetConfigCache("ChannelNames", x => x.GetGuild().VoiceChannels.ToDictionary(y => y.Id, z => z.Name));
            _toIgnore     = GetConfigCache("ToIgnore", x => new List <ulong>()
            {
                (x.GetGuild().AFKChannel?.Id).GetValueOrDefault()
            });
            //_nameFormat = GetConfigCache("NameFormat", x => "[TAGS][NAME] - [GAME]");
            _musicBotId          = GetConfigCache("MusicBotId", x => (ulong)0);
            _internationalRoleId = GetConfigCache("MusicBotId", x => (ulong)0);

            AddConfigInfo("Set Channel Name", "Display channel names", () => "Current channel names:\n" + string.Join('\n', _channelNames.GetValue().Select(x => x.Value).ToArray()));
            AddConfigInfo("Set Channel Name", "Set channel name", new Action <SocketVoiceChannel, string>((x, y) => _channelNames.MutateValue(z => z[x.Id] = y)), () => "Succesfully set channel names.", "Channel", "New name");
            AddConfigInfo("Set Channel Name", "Set channel name", new Action <string, string>((x, y) => _channelNames.MutateValue(z => z[GuildHandler.FindVoiceChannel(x).Id] = y)), () => "Succesfully set channel names.", "Channel", "New name");

            AddConfigInfo("Dont Name Channel", "Ignore channel", new Action <SocketVoiceChannel>((x) => _toIgnore.MutateValue(y => y.Add(x.Id))), () => "Added channel to list of ignored.", "Channel");
            AddConfigInfo("Dont Name Channel", "Ignore channel", new Action <ulong>((x) => _toIgnore.MutateValue(y => y.Add(x))), () => "Added channel to list of default.", "ignored");
            AddConfigInfo("Dont Name Channel", "Ignore channel", new Action <string>((x) => _toIgnore.MutateValue(y => y.Add(GuildHandler.FindVoiceChannel(x).Id))), () => "Added channel to list of ignored.", "Channel");

            AddConfigInfo("Do Name Channel", "Unignore channel", new Action <SocketVoiceChannel>((x) => _toIgnore.MutateValue(y => y.Remove(x.Id))), () => "Removed channel from list of ignored.", "Channel");
            AddConfigInfo("Do Name Channel", "Unignore channel", new Action <ulong>((x) => _toIgnore.MutateValue(y => y.Remove(x))), () => "Removed channel from list of ignored.", "Channel");
            AddConfigInfo("Do Name Channel", "Unignore channel", new Action <string>((x) => _toIgnore.MutateValue(y => y.Remove(GuildHandler.FindVoiceChannel(x).Id))), () => "Removed channel from list of ignored.", "Channel");

            AddConfigInfo("Set Music Bot", "Set music bot.", new Action <SocketGuildUser>((x) => _musicBotId.SetValue(x.Id)), () => $"Set music bot to be {GuildHandler.GetUser(_musicBotId.GetValue()).GetShownName()}.", "Music Bot");
            AddConfigInfo("Set Music Bot", "Set music bot.", new Action <string>((x) => _musicBotId.SetValue(GuildHandler.FindUser(x).Id)), () => $"Set music bot to be {GuildHandler.GetUser(_musicBotId.GetValue()).GetShownName()}.", "Music Bot");
            AddConfigInfo("Set Music Bot", "Show music bot.", () => GuildHandler.GetUser(_musicBotId.GetValue()) == null ? "Current music bot doesn't exist :(" : "Current music bot is " + GuildHandler.GetUser(_musicBotId.GetValue()).GetShownName());

            AddConfigInfo("Set International Role", "Set role.", new Action <SocketRole>((x) => _internationalRoleId.SetValue(x.Id)), () => $"Set international role to be {GuildHandler.GetRole(_internationalRoleId.GetValue()).Name}.", "Role");
            AddConfigInfo("Set International Role", "Set role.", new Action <string>((x) => _internationalRoleId.SetValue(GuildHandler.FindRole(x).Id)), () => $"Set international role to be {GuildHandler.GetRole(_internationalRoleId.GetValue()).Name}.", "Role Name");
            AddConfigInfo("Set International Role", "Show role.", () => GuildHandler.GetRole(_internationalRoleId.GetValue()) == null ? "Current international role doesn't exist :(" : "Current international role is " + GuildHandler.GetRole(_internationalRoleId.GetValue()).Name);

            SendMessage("Lomztein-Command Root", "AddCommand", commandSet);
        }
コード例 #6
0
        public override void Initialize()
        {
            GuildHandler.MessageReceived += OnMessageRecieved;
            _phrases = GetConfigCache("Phrases", x => new List <Phrase>());

            #region
            AddConfigInfo("Add Phrase", "Add empty phrase.", () => { _phrases.GetValue().Add(new Phrase()); _phrases.Store(); }, () => $"Added new empty response phrase at index {_phrases.GetValue ().Count - 1}. You must edit it using the other config options available here.");
            AddConfigInfo <int>("Remove Phrase", "Remove phrase.", x => { _phrases.GetValue().RemoveAt(x); _phrases.Store(); }, x => $"Removed response phrase at the index {x}.", "Index");
            AddConfigInfo("List Phrases", "List current phrases.", () => "Current phrases:\n" + string.Join('\n', _phrases.GetValue().Select(x => _phrases.GetValue().IndexOf(x) + " -> " + x.ToString(GuildHandler))));

            AddConfigInfo("Set Phrase Trigger", "Set trigger", () => { _phrases.GetValue().LastOrDefault().Trigger = string.Empty; _phrases.Store(); }, () => $"Most recent phrase trigger reset.");
            AddConfigInfo <string>("Set Phrase Trigger", "Set trigger", y => { _phrases.GetValue().LastOrDefault().Trigger = y; _phrases.Store(); }, y => $"Most recent phrase trigger set to {y}.", "Trigger");
            AddConfigInfo <int>("Set Phrase Trigger", "Set trigger", x => { _phrases.GetValue()[x].Trigger = string.Empty; _phrases.Store(); }, x => $"Phrase trigger at index {x} reset.", "Index");
            AddConfigInfo <int, string>("Set Phrase Trigger", "Set trigger", (x, y) => { _phrases.GetValue()[x].Trigger = y; _phrases.Store(); }, (x, y) => $"Phrase trigger at index {x} updated to '{y}'.", "Index", "Trigger");

            AddConfigInfo("Set Phrase User", "Set user", () => { _phrases.GetValue().LastOrDefault().UserId = 0; _phrases.Store(); }, () => $"Most recent phrase user reset.");
            AddConfigInfo <SocketGuildUser>("Set Phrase User", "Set user", y => { _phrases.GetValue().LastOrDefault().UserId = y.Id; _phrases.Store(); }, x => $"Most recent phrase user updated to '{x.GetShownName ()}'.", "User");
            AddConfigInfo <string>("Set Phrase User", "Set user", y => { _phrases.GetValue().LastOrDefault().UserId = GuildHandler.GetUser(y).Id; _phrases.Store(); }, y => $"Most recent phrase user updated to '{GuildHandler.GetUser (y).GetShownName ()}'.", "Username");
            AddConfigInfo <ulong>("Set Phrase User", "Set user", y => { _phrases.GetValue().LastOrDefault().UserId = y; _phrases.Store(); }, y => $"Most recent phrase user updated to '{GuildHandler.GetUser (y).GetShownName ()}.", "User ID");

            AddConfigInfo <int>("Set Phrase User", "Set user", x => { _phrases.GetValue()[x].UserId = 0; _phrases.Store(); }, x => $"Phrase user at index {x} reset.", "Index");
            AddConfigInfo <int, SocketGuildUser>("Set Phrase User", "Set user", (x, y) => { _phrases.GetValue()[x].UserId = y.Id; _phrases.Store(); }, (x, y) => $"Phrase user at index {x} updated to '{y.GetShownName()}'.", "Index", "User");
            AddConfigInfo <int, string>("Set Phrase User", "Set user", (x, y) => { _phrases.GetValue()[x].UserId = GuildHandler.FindUser(y).Id; _phrases.Store(); }, (x, y) => $"Phrase user at index {x} updated to '{GuildHandler.GetUser (y).GetShownName ()}'.", "Index", "Username");
            AddConfigInfo <int, ulong>("Set Phrase User", "Set user", (x, y) => { _phrases.GetValue()[x].UserId = y; _phrases.Store(); }, (x, y) => $"Phrase user at index {x} updated to '{GuildHandler.GetUser(y).GetShownName ()}'.", "Index", "User ID");

            AddConfigInfo("Set Phrase Channel", "Set channel", () => { _phrases.GetValue().LastOrDefault().ChannelId = 0; _phrases.Store(); }, () => $"Most recent phrase channel reset.");
            AddConfigInfo <SocketTextChannel>("Set Phrase Channel", "Set channel", y => { _phrases.GetValue().LastOrDefault().ChannelId = y.Id; _phrases.Store(); }, x => $"Most recent phrase channel updated to '{x.Name}'.", "Channel");
            AddConfigInfo <string>("Set Phrase Channel", "Set channel", y => { _phrases.GetValue().LastOrDefault().ChannelId = GuildHandler.GetTextChannel(y).Id; _phrases.Store(); }, x => $"Most recent phrase channel updated to '{GuildHandler.GetTextChannel (x).Name}'.", "Channel Name");
            AddConfigInfo <ulong>("Set Phrase Channel", "Set channel", y => { _phrases.GetValue().LastOrDefault().ChannelId = y; _phrases.Store(); }, x => $"Most recent phrase channel updated to '{GuildHandler.GetTextChannel (x).Name}'.", "Channel ID");

            AddConfigInfo <int>("Set Phrase Channel", "Set channel", x => { _phrases.GetValue()[x].ChannelId = 0; _phrases.Store(); }, x => $"Phrase channel at index {x} reset.", "Index");
            AddConfigInfo <int, SocketTextChannel>("Set Phrase Channel", "Set channel", (x, y) => { _phrases.GetValue()[x].ChannelId = y.Id; _phrases.Store(); }, (x, y) => $"Phrase channel at index {x} updated to '{y.Name}'.", "Index", "Channel");
            AddConfigInfo <int, string>("Set Phrase Channel", "Set channel", (x, y) => { _phrases.GetValue()[x].ChannelId = GuildHandler.GetTextChannel(y).Id; _phrases.Store(); }, (x, y) => $"Phrase channel at index {x} updated to '{GuildHandler.GetTextChannel(y).Name}'.", "Index", "Channel Name");
            AddConfigInfo <int, ulong>("Set Phrase Channel", "Set channel", (x, y) => { _phrases.GetValue()[x].ChannelId = y; _phrases.Store(); }, (x, y) => $"Phrase channel at index {x} '{GuildHandler.GetTextChannel (y)}'.", "Index", "Channel ID");

            AddConfigInfo("Set Phrase Chance", "Set chance", () => { _phrases.GetValue().LastOrDefault().Chance = 0; _phrases.Store(); }, () => $"Most recent chance reset.");
            AddConfigInfo <double>("Set Phrase Chance", "Set chance", y => { _phrases.GetValue().LastOrDefault().Chance = Math.Clamp(y, 0d, 100d); _phrases.Store(); }, y => $"Most recent phrase chance updated to {y}.", "Chance");
            AddConfigInfo("Set Phrase Response", "Set response", () => { _phrases.GetValue().LastOrDefault().Response = string.Empty; _phrases.Store(); }, () => $"Most recent phrase response reset.");
            AddConfigInfo <string>("Set Phrase Response", "Set response", y => { _phrases.GetValue().LastOrDefault().Response = y; _phrases.Store(); }, x => $"Most recent phrase response updated {x}.", "Response");
            AddConfigInfo("Set Phrase Emoji", "Set emoji", () => { _phrases.GetValue().LastOrDefault().Emoji = string.Empty; _phrases.Store(); }, () => $"Most recent phrase emoji reset.");
            AddConfigInfo <string>("Set Phrase Emoji", "Set emoji", y => { _phrases.GetValue().LastOrDefault().Emoji = y; _phrases.Store(); }, x => $"Most recent phrase emoji updated {x}.", "Emoji");

            AddConfigInfo <int>("Set Phrase Chance", "Set chance", x => { _phrases.GetValue()[x].Chance = 100; _phrases.Store(); }, x => $"Phrase at index {x} chance reset.", "Index");
            AddConfigInfo <int, double>("Set Phrase Chance", "Set chance", (x, y) => { _phrases.GetValue()[x].Chance = Math.Clamp(y, 0d, 100d); _phrases.Store(); }, (x, y) => $"Phrase at index {x} chance updated to {y}.", "Index", "Chance");
            AddConfigInfo <int>("Set Phrase Response", "Set response", x => { _phrases.GetValue()[x].Response = string.Empty; _phrases.Store(); }, x => $"Phrase at index {x} response reset.", "Index");
            AddConfigInfo <int, string>("Set Phrase Response", "Set response", (x, y) => { _phrases.GetValue()[x].Response = y; _phrases.Store(); }, (x, y) => $"Phrase at index {x} response updated to {y}.", "Index", "Response");
            AddConfigInfo <int>("Set Phrase Emoji", "Set emoji", x => { _phrases.GetValue()[x].Emoji = string.Empty; _phrases.Store(); }, x => $"Phrase at index {x} emoji reset.", "Index");
            AddConfigInfo <int, string>("Set Phrase Emoji", "Set emoji", (x, y) => { _phrases.GetValue()[x].Emoji = y; _phrases.Store(); }, (x, y) => $"Phrase at index {x} emoji updated to {y}.", "Index", "Emoji");
            #endregion
            AddGeneralFeaturesStateAttribute("AutomatedPhrases", "Automatic response to certain phrases as configured.");
        }
コード例 #7
0
        public override void Initialize()
        {
            GuildHandler.MessageReceived += OnMessageRecieved;
            _phrases = GetConfigCache("Phrases", x => new List <Phrase>());

            #region
            AddConfigInfo("Add Phrase", "Add empty phrase.", new Action(() => { _phrases.GetValue().Add(new Phrase()); _phrases.Store(); }), () => $"Added new empty response phrase at index {_phrases.GetValue ().Count - 1}. You must edit it using the other config options available here.");
            AddConfigInfo("Remove Phrase", "Remove phrase.", new Action <int>((x) => { _phrases.GetValue().RemoveAt(x); _phrases.Store(); }), () => $"Removed response phrase at the given index.", "Index");
            AddConfigInfo("List Phrases", "List current phrases.", () => "Current phrases:\n" + string.Join('\n', _phrases.GetValue().Select(x => _phrases.GetValue().IndexOf(x) + " -> " + PhraseToString(x))));

            AddConfigInfo("Set Phrase Trigger", "Set trigger", new Action(() => { _phrases.GetValue().LastOrDefault().triggerPhrase = string.Empty; _phrases.Store(); }), () => $"Phrase trigger reset.");
            AddConfigInfo("Set Phrase Trigger", "Set trigger", new Action <string>((y) => { _phrases.GetValue().LastOrDefault().triggerPhrase = y; _phrases.Store(); }), () => $"Phrase trigger updated.", "Trigger");
            AddConfigInfo("Set Phrase Trigger", "Set trigger", new Action <int>((x) => { _phrases.GetValue()[x].triggerPhrase = string.Empty; _phrases.Store(); }), () => $"Phrase trigger reset.", "Index");
            AddConfigInfo("Set Phrase Trigger", "Set trigger", new Action <int, string>((x, y) => { _phrases.GetValue()[x].triggerPhrase = y; _phrases.Store(); }), () => $"Phrase trigger updated.", "Index", "Trigger");

            AddConfigInfo("Set Phrase User", "Set user", new Action(() => { _phrases.GetValue().LastOrDefault().userID = 0; _phrases.Store(); }), () => $"Phrase user reset.");
            AddConfigInfo("Set Phrase User", "Set user", new Action <SocketGuildUser>((y) => { _phrases.GetValue().LastOrDefault().userID = y.Id; _phrases.Store(); }), () => $"Phrase user updated.", "User");
            AddConfigInfo("Set Phrase User", "Set user", new Action <string>((y) => { _phrases.GetValue().LastOrDefault().userID = GuildHandler.FindUser(y).Id; _phrases.Store(); }), () => $"Phrase user updated.", "Username");
            AddConfigInfo("Set Phrase User", "Set user", new Action <ulong>((y) => { _phrases.GetValue().LastOrDefault().userID = y; _phrases.Store(); }), () => $"Phrase user updated.", "User ID");

            AddConfigInfo("Set Phrase User", "Set user", new Action <int>((x) => { _phrases.GetValue()[x].userID = 0; _phrases.Store(); }), () => $"Phrase user reset.", "Index");
            AddConfigInfo("Set Phrase User", "Set user", new Action <int, SocketGuildUser>((x, y) => { _phrases.GetValue()[x].userID = y.Id; _phrases.Store(); }), () => $"Phrase user updated.", "Index", "User");
            AddConfigInfo("Set Phrase User", "Set user", new Action <int, string>((x, y) => { _phrases.GetValue()[x].userID = GuildHandler.FindUser(y).Id; _phrases.Store(); }), () => $"Phrase user updated.", "Index", "Username");
            AddConfigInfo("Set Phrase User", "Set user", new Action <int, ulong>((x, y) => { _phrases.GetValue()[x].userID = y; _phrases.Store(); }), () => $"Phrase user updated.", "Index", "User ID");

            AddConfigInfo("Set Phrase Channel", "Set channel", new Action(() => { _phrases.GetValue().LastOrDefault().channelID = 0; _phrases.Store(); }), () => $"Phrase channel reset.");
            AddConfigInfo("Set Phrase Channel", "Set channel", new Action <SocketTextChannel>((y) => { _phrases.GetValue().LastOrDefault().channelID = y.Id; _phrases.Store(); }), () => $"Phrase channel updated.", "Channel");
            AddConfigInfo("Set Phrase Channel", "Set channel", new Action <string>((y) => { _phrases.GetValue().LastOrDefault().channelID = GuildHandler.FindTextChannel(y).Id; _phrases.Store(); }), () => $"Phrase channel updated.", "Channel Name");
            AddConfigInfo("Set Phrase Channel", "Set channel", new Action <ulong>((y) => { _phrases.GetValue().LastOrDefault().channelID = y; _phrases.Store(); }), () => $"Phrase trigger updated.", "Channel ID");

            AddConfigInfo("Set Phrase Channel", "Set channel", new Action <int>((x) => { _phrases.GetValue()[x].channelID = 0; _phrases.Store(); }), () => $"Phrase channel reset.", "Index");
            AddConfigInfo("Set Phrase Channel", "Set channel", new Action <int, SocketTextChannel>((x, y) => { _phrases.GetValue()[x].channelID = y.Id; _phrases.Store(); }), () => $"Phrase channel updated.", "Index", "Channel");
            AddConfigInfo("Set Phrase Channel", "Set channel", new Action <int, string>((x, y) => { _phrases.GetValue()[x].channelID = GuildHandler.FindTextChannel(y).Id; _phrases.Store(); }), () => $"Phrase channel updated.", "Index", "Channel Name");
            AddConfigInfo("Set Phrase Channel", "Set channel", new Action <int, ulong>((x, y) => { _phrases.GetValue()[x].channelID = y; _phrases.Store(); }), () => $"Phrase trigger updated.", "Index", "Channel ID");

            AddConfigInfo("Set Phrase Chance", "Set chance", new Action(() => { _phrases.GetValue().LastOrDefault().chance = 0; _phrases.Store(); }), () => $"Phrase chance reset.");
            AddConfigInfo("Set Phrase Chance", "Set chance", new Action <double>((y) => { _phrases.GetValue().LastOrDefault().chance = Math.Clamp(y, 0d, 100d); _phrases.Store(); }), () => $"Phrase chance updated.", "Chance");
            AddConfigInfo("Set Phrase Response", "Set response", new Action(() => { _phrases.GetValue().LastOrDefault().response = string.Empty; _phrases.Store(); }), () => $"Phrase response reset.");
            AddConfigInfo("Set Phrase Response", "Set response", new Action <string>((y) => { _phrases.GetValue().LastOrDefault().response = y; _phrases.Store(); }), () => $"Phrase response updated.", "Response");
            AddConfigInfo("Set Phrase Emoji", "Set emoji", new Action(() => { _phrases.GetValue().LastOrDefault().emoji = string.Empty; _phrases.Store(); }), () => $"Phrase Emoji reset.");
            AddConfigInfo("Set Phrase Emoji", "Set emoji", new Action <string>((y) => { _phrases.GetValue().LastOrDefault().emoji = y; _phrases.Store(); }), () => $"Phrase Emoji updated.", "Emoji");

            AddConfigInfo("Set Phrase Chance", "Set chance", new Action <int>((x) => { _phrases.GetValue()[x].chance = 100; _phrases.Store(); }), () => $"Phrase chance reset.", "Index");
            AddConfigInfo("Set Phrase Chance", "Set chance", new Action <int, double>((x, y) => { _phrases.GetValue()[x].chance = Math.Clamp(y, 0d, 100d); _phrases.Store(); }), () => $"Phrase chance updated.", "Index", "Chance");
            AddConfigInfo("Set Phrase Response", "Set response", new Action <int>((x) => { _phrases.GetValue()[x].response = string.Empty; _phrases.Store(); }), () => $"Phrase response reset.", "Index");
            AddConfigInfo("Set Phrase Response", "Set response", new Action <int, string>((x, y) => { _phrases.GetValue()[x].response = y; _phrases.Store(); }), () => $"Phrase response updated.", "Index", "Response");
            AddConfigInfo("Set Phrase Emoji", "Set emoji", new Action <int>((x) => { _phrases.GetValue()[x].emoji = string.Empty; _phrases.Store(); }), () => $"Phrase Emoji reset.", "Index");
            AddConfigInfo("Set Phrase Emoji", "Set emoji", new Action <int, string>((x, y) => { _phrases.GetValue()[x].emoji = y; _phrases.Store(); }), () => $"Phrase Emoji updated.", "Index", "Emoji");
            #endregion
        }