Add more command aliases

This commit is contained in:
Ske 2019-07-10 13:55:48 +02:00
parent 352940abbd
commit 31173af87d
6 changed files with 46 additions and 17 deletions

View File

@ -6,22 +6,35 @@ namespace PluralKit.Bot.Commands
{
public class HelpCommands: ModuleBase<PKCommandContext>
{
[Command("help")]
[Remarks("help")]
public async Task HelpRoot([Remainder] string _ignored)
[Group("help")]
public class HelpGroup: ModuleBase<PKCommandContext>
{
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")]

View File

@ -23,6 +23,7 @@ namespace PluralKit.Bot.Commands
public override string ContextNoun => "member";
[Command("new")]
[Alias("n", "add", "create", "register")]
[Remarks("member new <name>")]
[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 <member> description <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 <member> delete")]
[MustPassOwnMember]
public async Task MemberDelete()

View File

@ -7,6 +7,7 @@ namespace PluralKit.Bot.Commands {
public BotConfig BotConfig { get; set; }
[Command("invite")]
[Alias("inv")]
[Remarks("invite")]
public async Task Invite()
{

View File

@ -27,6 +27,7 @@ namespace PluralKit.Bot.Commands
[Command("message")]
[Remarks("message <messageid>")]
[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 <messageid>")]
[Alias("msg")]
public async Task GetMessage(IMessage msg) => await GetMessage(msg.Id);
}
}

View File

@ -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 <date/time>")]
[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()
{

View File

@ -37,6 +37,7 @@ namespace PluralKit.Bot.Commands
}
[Command("new")]
[Alias("register", "create", "init", "add", "make")]
[Remarks("system new <name>")]
public async Task New([Remainder] string systemName = null)
{
@ -49,6 +50,7 @@ namespace PluralKit.Bot.Commands
}
[Command("name")]
[Alias("rename", "changename")]
[Remarks("system name <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 <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<PKCommandContext> {
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)