From 31173af87d2fcab7815da620c1c8a0773e351a19 Mon Sep 17 00:00:00 2001 From: Ske Date: Wed, 10 Jul 2019 13:55:48 +0200 Subject: [PATCH] Add more command aliases --- PluralKit.Bot/Commands/HelpCommands.cs | 43 +++++++++++++++--------- PluralKit.Bot/Commands/MemberCommands.cs | 5 +-- PluralKit.Bot/Commands/MiscCommands.cs | 1 + PluralKit.Bot/Commands/ModCommands.cs | 2 ++ PluralKit.Bot/Commands/SwitchCommands.cs | 3 ++ PluralKit.Bot/Commands/SystemCommands.cs | 9 +++++ 6 files changed, 46 insertions(+), 17 deletions(-) diff --git a/PluralKit.Bot/Commands/HelpCommands.cs b/PluralKit.Bot/Commands/HelpCommands.cs index 183d2e6f..ba705178 100644 --- a/PluralKit.Bot/Commands/HelpCommands.cs +++ b/PluralKit.Bot/Commands/HelpCommands.cs @@ -6,22 +6,35 @@ namespace PluralKit.Bot.Commands { public class HelpCommands: ModuleBase { - [Command("help")] - [Remarks("help")] - public async Task HelpRoot([Remainder] string _ignored) + [Group("help")] + public class HelpGroup: ModuleBase { - await Context.Channel.SendMessageAsync(embed: new EmbedBuilder() - .WithTitle("PluralKit") - .WithDescription("PluralKit is a bot designed for plural communities on Discord. It allows you to register systems, maintain system information, set up message proxying, log switches, and more.") - .AddField("What is this for? What are systems?", "This bot detects messages with certain tags associated with a profile, then replaces that message under a \"pseudo-account\" of that profile using webhooks. This is useful for multiple people sharing one body (aka \"systems\"), people who wish to roleplay as different characters without having several accounts, or anyone else who may want to post messages as a different person from the same account.") - .AddField("Why are people's names saying [BOT] next to them?", "These people are not actually bots, this is just a Discord limitation. See [the documentation](https://pluralkit.me/guide#proxying) for an in-depth explanation.") - .AddField("How do I get started?", "To get started using PluralKit, try running the following commands (of course replacing the relevant names with your own):\n**1**. `pk;system new` - Create a system (if you haven't already)\n**2**. `pk;member add John` - Add a new member to your system\n**3**. `pk;member John proxy [text]` - Set up [square brackets] as proxy tags\n**4**. You're done! You can now type [a message in brackets] and it'll be proxied appropriately.\n**5**. Optionally, you may set an avatar from the URL of an image with `pk;member John avatar [link to image]`, or from a file by typing `pk;member John avatar` and sending the message with an attached image.\n\nSee [the documentation](https://pluralkit.me/guide#member-management) for more information.") - .AddField("Useful tips", $"React with {Emojis.Error} on a proxied message to delete it (only if you sent it!)\nReact with {Emojis.RedQuestion} on a proxied message to look up information about it (like who sent it)\nType **`pk;invite`** to get a link to invite this bot to your own server!") - .AddField("More information", "For a full list of commands, see [the command list](https://pluralkit.me/commands).\nFor a more in-depth explanation of message proxying, see [the documentation](https://pluralkit.me/guide#proxying).\nIf you're an existing user of Tupperbox, type `pk;import` and attach a Tupperbox export file (from `tul!export`) to import your data from there.") - .AddField("Support server", "We also have a Discord server for support, discussion, suggestions, announcements, etc: https://discord.gg/PczBt78") - .WithFooter("By @Ske#6201 | GitHub: https://github.com/xSke/PluralKit/ | Website: https://pluralkit.me/") - .WithColor(Color.Blue) - .Build()); + [Command("proxy")] + [Priority(1)] + [Remarks("help proxy")] + public async Task HelpProxy() + { + await Context.Channel.SendMessageAsync( + "The proxy help page has been moved! See the website: https://pluralkit.me/guide#proxying"); + } + + [Command] + [Remarks("help")] + public async Task HelpRoot([Remainder] string _ignored = null) + { + await Context.Channel.SendMessageAsync(embed: new EmbedBuilder() + .WithTitle("PluralKit") + .WithDescription("PluralKit is a bot designed for plural communities on Discord. It allows you to register systems, maintain system information, set up message proxying, log switches, and more.") + .AddField("What is this for? What are systems?", "This bot detects messages with certain tags associated with a profile, then replaces that message under a \"pseudo-account\" of that profile using webhooks. This is useful for multiple people sharing one body (aka \"systems\"), people who wish to roleplay as different characters without having several accounts, or anyone else who may want to post messages as a different person from the same account.") + .AddField("Why are people's names saying [BOT] next to them?", "These people are not actually bots, this is just a Discord limitation. See [the documentation](https://pluralkit.me/guide#proxying) for an in-depth explanation.") + .AddField("How do I get started?", "To get started using PluralKit, try running the following commands (of course replacing the relevant names with your own):\n**1**. `pk;system new` - Create a system (if you haven't already)\n**2**. `pk;member add John` - Add a new member to your system\n**3**. `pk;member John proxy [text]` - Set up [square brackets] as proxy tags\n**4**. You're done! You can now type [a message in brackets] and it'll be proxied appropriately.\n**5**. Optionally, you may set an avatar from the URL of an image with `pk;member John avatar [link to image]`, or from a file by typing `pk;member John avatar` and sending the message with an attached image.\n\nSee [the documentation](https://pluralkit.me/guide#member-management) for more information.") + .AddField("Useful tips", $"React with {Emojis.Error} on a proxied message to delete it (only if you sent it!)\nReact with {Emojis.RedQuestion} on a proxied message to look up information about it (like who sent it)\nType **`pk;invite`** to get a link to invite this bot to your own server!") + .AddField("More information", "For a full list of commands, see [the command list](https://pluralkit.me/commands).\nFor a more in-depth explanation of message proxying, see [the documentation](https://pluralkit.me/guide#proxying).\nIf you're an existing user of Tupperbox, type `pk;import` and attach a Tupperbox export file (from `tul!export`) to import your data from there.") + .AddField("Support server", "We also have a Discord server for support, discussion, suggestions, announcements, etc: https://discord.gg/PczBt78") + .WithFooter("By @Ske#6201 | GitHub: https://github.com/xSke/PluralKit/ | Website: https://pluralkit.me/") + .WithColor(Color.Blue) + .Build()); + } } [Command("commands")] diff --git a/PluralKit.Bot/Commands/MemberCommands.cs b/PluralKit.Bot/Commands/MemberCommands.cs index 4ade46c4..b9db1d9c 100644 --- a/PluralKit.Bot/Commands/MemberCommands.cs +++ b/PluralKit.Bot/Commands/MemberCommands.cs @@ -23,6 +23,7 @@ namespace PluralKit.Bot.Commands public override string ContextNoun => "member"; [Command("new")] + [Alias("n", "add", "create", "register")] [Remarks("member new ")] [MustHaveSystem] public async Task NewMember([Remainder] string memberName) { @@ -82,7 +83,7 @@ namespace PluralKit.Bot.Commands } [Command("description")] - [Alias("info", "bio", "text")] + [Alias("info", "bio", "text", "desc")] [Remarks("member description ")] [MustPassOwnMember] public async Task MemberDescription([Remainder] string description = null) { @@ -174,7 +175,7 @@ namespace PluralKit.Bot.Commands } [Command("delete")] - [Alias("remove", "erase", "yeet")] + [Alias("remove", "destroy", "erase", "yeet")] [Remarks("member delete")] [MustPassOwnMember] public async Task MemberDelete() diff --git a/PluralKit.Bot/Commands/MiscCommands.cs b/PluralKit.Bot/Commands/MiscCommands.cs index 08890101..99ace985 100644 --- a/PluralKit.Bot/Commands/MiscCommands.cs +++ b/PluralKit.Bot/Commands/MiscCommands.cs @@ -7,6 +7,7 @@ namespace PluralKit.Bot.Commands { public BotConfig BotConfig { get; set; } [Command("invite")] + [Alias("inv")] [Remarks("invite")] public async Task Invite() { diff --git a/PluralKit.Bot/Commands/ModCommands.cs b/PluralKit.Bot/Commands/ModCommands.cs index 08be09b9..a61e0ed1 100644 --- a/PluralKit.Bot/Commands/ModCommands.cs +++ b/PluralKit.Bot/Commands/ModCommands.cs @@ -27,6 +27,7 @@ namespace PluralKit.Bot.Commands [Command("message")] [Remarks("message ")] + [Alias("msg")] public async Task GetMessage(ulong messageId) { var message = await Messages.Get(messageId); @@ -37,6 +38,7 @@ namespace PluralKit.Bot.Commands [Command("message")] [Remarks("message ")] + [Alias("msg")] public async Task GetMessage(IMessage msg) => await GetMessage(msg.Id); } } \ No newline at end of file diff --git a/PluralKit.Bot/Commands/SwitchCommands.cs b/PluralKit.Bot/Commands/SwitchCommands.cs index a118ea61..8568e11f 100644 --- a/PluralKit.Bot/Commands/SwitchCommands.cs +++ b/PluralKit.Bot/Commands/SwitchCommands.cs @@ -22,6 +22,7 @@ namespace PluralKit.Bot.Commands public async Task Switch(params PKMember[] members) => await DoSwitchCommand(members); [Command("out")] + [Alias("none")] [Remarks("switch out")] [MustHaveSystem] public async Task SwitchOut() => await DoSwitchCommand(new PKMember[] { }); @@ -56,6 +57,7 @@ namespace PluralKit.Bot.Commands } [Command("move")] + [Alias("shift")] [Remarks("switch move ")] [MustHaveSystem] public async Task SwitchMove([Remainder] string str) @@ -101,6 +103,7 @@ namespace PluralKit.Bot.Commands [Command("delete")] [Remarks("switch delete")] + [Alias("remove", "erase", "cancel", "yeet")] [MustHaveSystem] public async Task SwitchDelete() { diff --git a/PluralKit.Bot/Commands/SystemCommands.cs b/PluralKit.Bot/Commands/SystemCommands.cs index d2894def..fad4cceb 100644 --- a/PluralKit.Bot/Commands/SystemCommands.cs +++ b/PluralKit.Bot/Commands/SystemCommands.cs @@ -37,6 +37,7 @@ namespace PluralKit.Bot.Commands } [Command("new")] + [Alias("register", "create", "init", "add", "make")] [Remarks("system new ")] public async Task New([Remainder] string systemName = null) { @@ -49,6 +50,7 @@ namespace PluralKit.Bot.Commands } [Command("name")] + [Alias("rename", "changename")] [Remarks("system name ")] [MustHaveSystem] public async Task Name([Remainder] string newSystemName = null) { @@ -60,6 +62,7 @@ namespace PluralKit.Bot.Commands } [Command("description")] + [Alias("desc")] [Remarks("system description ")] [MustHaveSystem] public async Task Description([Remainder] string newDescription = null) { @@ -96,6 +99,7 @@ namespace PluralKit.Bot.Commands } [Command("delete")] + [Alias("remove", "destroy", "erase", "yeet")] [Remarks("system delete")] [MustHaveSystem] public async Task Delete() { @@ -108,6 +112,7 @@ namespace PluralKit.Bot.Commands } [Group("list")] + [Alias("l", "members")] public class SystemListCommands: ModuleBase { public MemberStore Members { get; set; } @@ -158,6 +163,7 @@ namespace PluralKit.Bot.Commands } [Command("fronter")] + [Alias("f", "front", "fronters")] [Remarks("system [system] fronter")] public async Task SystemFronter() { @@ -171,6 +177,7 @@ namespace PluralKit.Bot.Commands } [Command("fronthistory")] + [Alias("fh", "history", "switches")] [Remarks("system [system] fronthistory")] public async Task SystemFrontHistory() { @@ -184,6 +191,7 @@ namespace PluralKit.Bot.Commands } [Command("frontpercent")] + [Alias("frontbreakdown", "frontpercent", "front%", "fp")] [Remarks("system [system] frontpercent [duration]")] public async Task SystemFrontPercent(string durationStr = "30d") { @@ -201,6 +209,7 @@ namespace PluralKit.Bot.Commands } [Command("timezone")] + [Alias("tz")] [Remarks("system timezone [timezone]")] [MustHaveSystem] public async Task SystemTimezone([Remainder] string zoneStr = null)