Пример #1
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));
        }
Пример #2
0
        private void MakeSuperSureCriticalPluginsAreEnabled()
        {
            bool changed = false;

            foreach (Type pluginType in PluginLoader.GetPlugins())
            {
                if (Plugin.IsCritical(pluginType))
                {
                    try // One day I promise to stop abusing throw statements, so that we can avoid this.
                    {
                        if (!IsPluginEnabled(Plugin.GetFullName(pluginType)))
                        {
                            AddPlugin(Plugin.GetFullName(pluginType));
                            Log.Write(Log.Type.PLUGIN, $"Added missing critical {Plugin.GetVersionedFullName(pluginType)} plugin to enabled list.");
                            changed = true;
                        }
                    }
                    catch (ArgumentException exc)
                    {
                        Log.Warning("Tried to add an already enabled plugin to while making super sure critical plugins were enabled.");
                        Log.Exception(exc);
                    }
                }
            }

            if (changed)
            {
                _enabledPlugins.Store();
            }
        }
Пример #3
0
        private void MakeSuperSureCriticalPluginsAreEnabled()
        {
            bool changed = false;

            foreach (Type pluginType in PluginLoader.GetPlugins())
            {
                if (Plugin.IsCritical(pluginType))
                {
                    try // One day I promise to stop abusing throw statements, so that we can avoid this.
                    {
                        AddPlugin(Plugin.GetFullName(pluginType));
                        Log.Write(Log.Type.PLUGIN, $"Added missing critical {Plugin.GetVersionedFullName (pluginType)} plugin to enabled list.");
                        changed = true;
                    }
                    catch (ArgumentException) { }
                }
            }

            if (changed)
            {
                _enabledPlugins.Store();
            }
        }
Пример #4
0
        private void ChangeKarma(IUser giver, IUser receiver, int direction)
        {
            if (giver.Id == receiver.Id)
            {
                return; // Can't go around giving yourself karma, ye twat.
            }
            if (!_karma.GetValue().ContainsKey(receiver.Id))
            {
                _karma.GetValue().Add(receiver.Id, new Selfworth());
            }

            if (direction > 0)
            {
                _karma.GetValue()[receiver.Id].Upvote();
            }
            else if (direction < 0)
            {
                _karma.GetValue()[receiver.Id].Downvote();
            }

            _karma.Store();
        }
Пример #5
0
 private void AddConfigInfoForMessage(CachedValue <List <string> > message, string name)
 {
     AddConfigInfo(name, "Add a message", new Action <int>(x => { message.GetValue().RemoveAt(x); message.Store(); }), () => $"Removed {name} message.", "Index");
     AddConfigInfo(name, "The above one actually removes lol will fix later", new Action <string>(x => { message.GetValue().Add(x); message.Store(); }), () => $"Added new {name} message.", "Message");
     AddConfigInfo(name, "Display messages", () => $"Current '{name}' messages:\n{string.Join('\n', message.GetValue().ToArray ())}");
 }
Пример #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
        }