Add improved command help functionality
This commit is contained in:
parent
9b7e331c5b
commit
94dcb91bd3
@ -205,8 +205,10 @@ async def command_root(ctx: CommandContext):
|
||||
await misc_commands.pkfreeze(ctx)
|
||||
elif ctx.match("starstorm"):
|
||||
await misc_commands.pkstarstorm(ctx)
|
||||
elif ctx.match("commands"):
|
||||
await misc_commands.command_list(ctx)
|
||||
else:
|
||||
raise CommandError("Unknown command {}. For a list of commands, type `pk;help commands`.".format(ctx.pop_str()))
|
||||
raise CommandError("Unknown command {}. For a list of commands, type `pk;commands`.".format(ctx.pop_str()))
|
||||
|
||||
|
||||
async def run_command(ctx: CommandContext, func):
|
||||
|
@ -7,18 +7,80 @@ from pluralkit.bot import help
|
||||
from pluralkit.bot.commands import *
|
||||
from pluralkit.bot.embeds import help_footer_embed
|
||||
|
||||
prefix = "pk;" # TODO: configurable
|
||||
|
||||
def make_footer_embed():
|
||||
embed = discord.Embed()
|
||||
embed.set_footer(text=help.helpfile["footer"])
|
||||
return embed
|
||||
|
||||
def make_command_embed(command):
|
||||
embed = make_footer_embed()
|
||||
embed.title = prefix + command["usage"]
|
||||
embed.description = (command["description"] + "\n" + command.get("longdesc", "")).strip()
|
||||
embed.add_field(name="Usage", value=prefix + command["usage"], inline=False)
|
||||
if "examples" in command:
|
||||
embed.add_field(name="Examples" if len(command["examples"]) > 1 else "Example", value="\n".join([prefix + cmd for cmd in command["examples"]]), inline=False)
|
||||
if "subcommands" in command:
|
||||
embed.add_field(name="Subcommands", value="\n".join([command["name"] + " " + sc["name"] for sc in command["subcommands"]]), inline=False)
|
||||
return embed
|
||||
|
||||
def find_command(command_list, name):
|
||||
for command in command_list:
|
||||
if command["name"].lower().strip() == name.lower().strip():
|
||||
return command
|
||||
|
||||
async def help_root(ctx: CommandContext):
|
||||
if ctx.match("commands"):
|
||||
await ctx.reply(help.all_commands, embed=help_footer_embed())
|
||||
elif ctx.match("proxy"):
|
||||
await ctx.reply(help.proxy_guide, embed=help_footer_embed())
|
||||
elif ctx.match("system"):
|
||||
await ctx.reply(help.system_commands, embed=help_footer_embed())
|
||||
elif ctx.match("member"):
|
||||
await ctx.reply(help.member_commands + "\n\n" + help.command_notes, embed=help_footer_embed())
|
||||
else:
|
||||
await ctx.reply(help.root, embed=help_footer_embed())
|
||||
for page_name, page_content in help.helpfile["pages"].items():
|
||||
if ctx.match(page_name):
|
||||
return await help_page(ctx, page_content)
|
||||
|
||||
if not ctx.has_next():
|
||||
return await help_page(ctx, help.helpfile["pages"]["root"])
|
||||
|
||||
return await help_command(ctx, ctx.remaining())
|
||||
|
||||
async def help_page(ctx, sections):
|
||||
msg = ""
|
||||
for section in sections:
|
||||
msg += "__**{}**__\n{}\n\n".format(section["name"], section["content"])
|
||||
|
||||
return await ctx.reply(content=msg, embed=make_footer_embed())
|
||||
|
||||
async def help_command(ctx, command_name):
|
||||
name_parts = command_name.replace(prefix, "").split(" ")
|
||||
command = find_command(help.helpfile["commands"], name_parts[0])
|
||||
name_parts = name_parts[1:]
|
||||
if not command:
|
||||
raise CommandError("Could not find command '{}'.".format(command_name))
|
||||
while len(name_parts) > 0:
|
||||
found_command = find_command(command["subcommands"], name_parts[0])
|
||||
if not found_command:
|
||||
break
|
||||
command = found_command
|
||||
name_parts = name_parts[1:]
|
||||
|
||||
return await ctx.reply(embed=make_command_embed(command))
|
||||
|
||||
async def command_list(ctx):
|
||||
cmds = []
|
||||
|
||||
categories = {}
|
||||
def make_command_list(lst):
|
||||
for cmd in lst:
|
||||
if not cmd["category"] in categories:
|
||||
categories[cmd["category"]] = []
|
||||
categories[cmd["category"]].append("**{}{}** - {}".format(prefix, cmd["usage"], cmd["description"]))
|
||||
if "subcommands" in cmd:
|
||||
make_command_list(cmd["subcommands"])
|
||||
make_command_list(help.helpfile["commands"])
|
||||
|
||||
embed = discord.Embed()
|
||||
embed.title = "PluralKit Commands"
|
||||
embed.description = "Type `pk;help <command>` for more information."
|
||||
for cat_name, cat_cmds in categories.items():
|
||||
embed.add_field(name=cat_name, value="\n".join(cat_cmds))
|
||||
await ctx.reply(embed=embed)
|
||||
|
||||
|
||||
async def invite_link(ctx: CommandContext):
|
||||
|
309
src/pluralkit/bot/help.json
Normal file
309
src/pluralkit/bot/help.json
Normal file
@ -0,0 +1,309 @@
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
"name": "system",
|
||||
"usage": "system [id]",
|
||||
"description": "Shows information about a system.",
|
||||
"longdesc": "The given ID can either be a 5-character ID, a Discord account @mention, or a Discord account ID. Leave blank to show your own system.",
|
||||
"examples": ["system", "system abcde", "system @Foo#1234", "system 102083498529026048"],
|
||||
"category": "System",
|
||||
"subcommands": [
|
||||
{
|
||||
"name": "new",
|
||||
"usage": "system new [name]",
|
||||
"category": "System",
|
||||
"description": "Creates a new system registered to your account."
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"usage": "system name [name]",
|
||||
"category": "System",
|
||||
"description": "Changes the name of your system."
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"usage": "system description [description]",
|
||||
"category": "System",
|
||||
"description": "Changes the description of your system."
|
||||
},
|
||||
{
|
||||
"name": "avatar",
|
||||
"usage": "system avatar [avatar url]",
|
||||
"category": "System",
|
||||
"description": "Changes the avatar of your system.",
|
||||
"longdesc": "**NB:** Avatar URLs must be a *direct* link to an image (ending in .jpg, .gif or .png), AND must be under the size of 1000x1000 (in both dimensions), AND must be smaller than 1 MB. If the avatar doesn't show up properly, it is likely one or more of these rules aren't followed. If you need somewhere to host an image, you can upload it to Discord or Imgur and copy the *direct* link from there.",
|
||||
"examples": ["system avatar https://i.imgur.com/HmK2Wgo.png"]
|
||||
},
|
||||
{
|
||||
"name": "tag",
|
||||
"usage": "system tag [tag]",
|
||||
"category": "System",
|
||||
"description": "Changes the system tag of your system.",
|
||||
"longdesc": "The system tag is a snippet of text added to the end of your member's names when proxying. Many servers require the use of a system tag for identification. Leave blank to clear.\n\n**NB:** You may use standard Discord emojis, but server/Nitro emojis won't work.",
|
||||
"examples": ["system tag |ABC", "system tag 💮", "system tag"]
|
||||
},
|
||||
{
|
||||
"name": "timezone",
|
||||
"usage": "system timezone [location]",
|
||||
"category": "System",
|
||||
"description": "Changes the time zone of your system.",
|
||||
"longdesc": "This affects all dates or times displayed in PluralKit. Leave blank to clear.\n\n**NB:** You need to specify a location (eg. the nearest major city to you). This allows PluralKit to dynamically adjust for time zone or DST changes.",
|
||||
"examples": ["system timezone New York", "system timezone Wichita Falls", "system timezone"]
|
||||
},
|
||||
{
|
||||
"name": "delete",
|
||||
"usage": "system delete",
|
||||
"category": "System",
|
||||
"description": "Deletes your system.",
|
||||
"longdesc": "The command will ask for confirmation.\n\n**This is irreversible, and will delete all information associated with your system, members, proxied messages, and accounts.**"
|
||||
},
|
||||
{
|
||||
"name": "fronter",
|
||||
"usage": "system [id] fronter",
|
||||
"category": "System",
|
||||
"description": "Shows the current fronter of a system."
|
||||
},
|
||||
{
|
||||
"name": "fronthistory",
|
||||
"usage": "system [id] fronthistory",
|
||||
"category": "System",
|
||||
"description": "Shows the last 10 switches of a system."
|
||||
},
|
||||
{
|
||||
"name": "frontpercent",
|
||||
"usage": "system [id] fronthistory [timeframe]",
|
||||
"category": "System",
|
||||
"description": "Shows the aggregated front history of a system within a given time frame.",
|
||||
"longdesc": "Percentages may add up to over 100% when multiple members cofront. Time frame will default to 1 month.",
|
||||
"examples": ["system fronthistory 1 month", "system fronthistory 2 weeks", "system @Foo#1234 fronthistory 4 days"]
|
||||
},
|
||||
{
|
||||
"name": "list",
|
||||
"usage": "system [id] list",
|
||||
"category": "System",
|
||||
"description": "Shows a paginated list of a system's members."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "link",
|
||||
"usage": "link <account>",
|
||||
"category": "System",
|
||||
"description": "Links this system to a different account.",
|
||||
"longdesc": "This means you can manage the system from both accounts. The other account will need to verify the link by reacting to a message.",
|
||||
"examples": ["link @Foo#1234", "link 102083498529026048"]
|
||||
},
|
||||
{
|
||||
"name": "unlink",
|
||||
"usage": "unlink",
|
||||
"category": "System",
|
||||
"description": "Unlinks this account from its system.",
|
||||
"longdesc": "You can't unlink the only account in a system."
|
||||
},
|
||||
{
|
||||
"name": "member",
|
||||
"usage": "member <name>",
|
||||
"category": "Member",
|
||||
"description": "Shows information about a member.",
|
||||
"longdesc": "The given member name can either be the name of a member in your own system or a 5-character member ID (in any system).",
|
||||
"examples": ["member John", "member abcde"],
|
||||
"subcommands": [
|
||||
{
|
||||
"name": "rename",
|
||||
"usage": "member <name> rename <name>",
|
||||
"category": "Member",
|
||||
"description": "Changes the name of a member.",
|
||||
"examples": ["member Jack rename Jill"]
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"usage": "member <name> description [description]",
|
||||
"category": "Member",
|
||||
"description": "Changes the description of a member.",
|
||||
"examples": ["member Jack description Very cool guy."]
|
||||
},
|
||||
{
|
||||
"name": "avatar",
|
||||
"usage": "member <name> avatar [avatarurl]",
|
||||
"category": "Member",
|
||||
"description": "Changes the avatar of a member.",
|
||||
"longdesc": "**NB:** Avatar URLs must be a *direct* link to an image (ending in .jpg, .gif or .png), AND must be under the size of 1000x1000 (in both dimensions), AND must be smaller than 1 MB. If the avatar doesn't show up properly, it is likely one or more of these rules aren't followed. If you need somewhere to host an image, you can upload it to Discord or Imgur and copy the *direct* link from there.",
|
||||
"examples": ["member Jack avatar https://i.imgur.com/HmK2Wgo.png"]
|
||||
},
|
||||
{
|
||||
"name": "proxy",
|
||||
"usage": "member <name> proxy [tags]",
|
||||
"category": "Member",
|
||||
"description": "Changes the proxy tags of a member.",
|
||||
"longdesc": "The proxy tags describe how to proxy this member through Discord. You must pass an \"example proxy\" of the word \"text\", ie. how you'd proxy the word \"text\". For example, if you want square brackets for this member, pass `[text]`. Emojis are allowed.",
|
||||
"examples": ["member Jack proxy [text]", "member Jill proxy J:text", "member Jones proxy 🍒text"]
|
||||
},
|
||||
{
|
||||
"name": "pronouns",
|
||||
"usage": "member <name> pronouns [pronouns]",
|
||||
"category": "Member",
|
||||
"description": "Changes the pronouns of a member.",
|
||||
"longdesc": "These will be displayed on their profile. This is a free text field, put whatever you'd like :)",
|
||||
"examples": ["member Jack pronouns he/him", "member Jill pronouns she/her or they/them", "member Jones pronouns use whatever lol"]
|
||||
},
|
||||
{
|
||||
"name": "color",
|
||||
"usage": "member <name> color [color]",
|
||||
"category": "Member",
|
||||
"description": "Changes the color of a member.",
|
||||
"longdesc": "This will displayed on their profile. Colors must be in hex format (eg. #ff0000).\n\n**NB:** Due to a Discord limitation, the colors don't affect proxied message names.",
|
||||
"examples": ["member Jack color #ff0000", "member Jill color #abcdef"]
|
||||
},
|
||||
{
|
||||
"name": "birthday",
|
||||
"usage": "member <name> birthday [birthday]",
|
||||
"category": "Member",
|
||||
"description": "Changes the birthday of a member.",
|
||||
"longdesc": "This must be in YYYY-MM-DD format, or just MM-DD if you don't want to specify a year.",
|
||||
"examples": ["member Jack birthday 1997-03-27", "member Jill birthday 2018-01-03", "member Jones birthday 12-21"]
|
||||
},
|
||||
{
|
||||
"name": "delete",
|
||||
"usage": "member <name> delete",
|
||||
"category": "Member",
|
||||
"description": "Deletes a member.",
|
||||
"longdesc": "This command will ask for confirmation.\n\n**This is irreversible, and will delete all data associated with this member.**"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "switch",
|
||||
"usage": "switch <member> [member...]",
|
||||
"category": "Switching",
|
||||
"description": "Registers a switch with the given members.",
|
||||
"longdesc": "You may specify multiple members to indicate cofronting.",
|
||||
"examples": ["switch Jack", "switch Jack Jill"],
|
||||
"subcommands": [
|
||||
{
|
||||
"name": "move",
|
||||
"usage": "switch move <time>",
|
||||
"category": "Switching",
|
||||
"description": "Moves the latest switch back or forwards in time.",
|
||||
"longdesc": "You can't move a switch into the future, and you can't move a switch further back than the second-latest switch (which would reorder front history).",
|
||||
"examples": ["switch move 1 day ago", "switch move 4:30 pm"]
|
||||
},
|
||||
{
|
||||
"name": "delete",
|
||||
"usage": "switch delete",
|
||||
"category": "Switching",
|
||||
"description": "Deletes the latest switch. Will ask for confirmation."
|
||||
},
|
||||
{
|
||||
"name": "out",
|
||||
"usage": "switch out",
|
||||
"category": "Switching",
|
||||
"description": "Will register a 'switch-out' - a switch with no associated members."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "log",
|
||||
"usage": "log <channel>",
|
||||
"category": "Utility",
|
||||
"description": "Sets a channel to log all proxied messages.",
|
||||
"longdesc": "This command is restricted to the server administrators (ie. users with the Administrator role).",
|
||||
"examples": "log #pluralkit-log"
|
||||
},
|
||||
{
|
||||
"name": "message",
|
||||
"usage": "message <messageid>",
|
||||
"category": "Utility",
|
||||
"description": "Looks up information about a message by its message ID.",
|
||||
"longdesc": " You can obtain a message ID by turning on Developer Mode in Discord's settings, and rightclicking/longpressing on a message.\n\n**Tip:** Reacting to a message with ❓ will DM you this information too.",
|
||||
"examples": "message 561614629802082304"
|
||||
},
|
||||
{
|
||||
"name": "invite",
|
||||
"usage": "invite",
|
||||
"category": "Utility",
|
||||
"description": "Sends the bot invite link for PluralKit."
|
||||
},
|
||||
{
|
||||
"name": "import",
|
||||
"usage": "import",
|
||||
"category": "Utility",
|
||||
"description": "Imports a .json file from Tupperbox.",
|
||||
"longdesc": "You will need to type the command, *then* send a new message containing the .json file as an attachment."
|
||||
},
|
||||
{
|
||||
"name": "export",
|
||||
"usage": "export",
|
||||
"category": "Utility",
|
||||
"description": "Exports your system to a .json file.",
|
||||
"longdesc": "This will respond with a .json file containing your system and member data, useful for importing elsewhere."
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"usage": "token",
|
||||
"category": "API",
|
||||
"description": "DMs you a token for using the PluralKit API.",
|
||||
"subcommands": [
|
||||
{
|
||||
"name": "refresh",
|
||||
"usage": "token refresh",
|
||||
"category": "API",
|
||||
"description": "Refreshes your API token.",
|
||||
"longdesc": "This will invalide the old token and DM you a new one. Do this if your token leaks in any way."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "help",
|
||||
"usage": "help [command]",
|
||||
"category": "Help",
|
||||
"description": "Displays help for a given command.",
|
||||
"examples": ["help", "help system", "help member avatar", "help switch move"],
|
||||
"subcommands": [
|
||||
{
|
||||
"name": "proxy",
|
||||
"usage": "help proxy",
|
||||
"category": "Help",
|
||||
"description": "Displays a short guide to the proxy functionality."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "commands",
|
||||
"usage": "commands",
|
||||
"category": "Help",
|
||||
"description": "Displays a paginated list of commands",
|
||||
"examples": ["commands", "commands"]
|
||||
}
|
||||
],
|
||||
"pages": {
|
||||
"root": [
|
||||
{
|
||||
"name": "PluralKit",
|
||||
"content": "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.\n\n**Who's this for? What are systems?**\nPut simply, a system is a person that shares their body with at least 1 other sentient \"self\". This may be a result of having a dissociative disorder like DID/OSDD or a practice known as Tulpamancy, but people that aren't tulpamancers or undiagnosed and have headmates are also systems.\n\n**Why are people's names saying [BOT] next to them? What's going on?**\nThese people are not actually bots, this is simply a caveat to the message proxying feature of PluralKit.\nType `pk;help proxy` for an in-depth explanation."
|
||||
},
|
||||
{
|
||||
"name": "Getting started",
|
||||
"content": "To get started using the bot, try running the following commands.\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!\n**5**. Optionally, you may set an avatar from the URL of an image with:\n`pk;member John avatar [link to image]`\n\nType `pk;help member` for more information."
|
||||
},
|
||||
{
|
||||
"name": "Useful tips",
|
||||
"content": "React with ❌ on a proxied message to delete it (if you sent it!).\nReact with ❓ on a proxied message to look up information about it, like who sent it."
|
||||
},
|
||||
{
|
||||
"name": "More information",
|
||||
"content": "For a full list of commands, type `pk;commands`.\nFor a more in-depth explanation of message proxying, type `pk;help proxy`.\nIf you're an existing user of the Tupperbox proxy bot, type `pk;import` to import your data from there."
|
||||
},
|
||||
{
|
||||
"name": "Support server",
|
||||
"content": "We also have a Discord server for support, discussion, suggestions, announcements, etc: <https://discord.gg/PczBt78>"
|
||||
}
|
||||
],
|
||||
"proxy": [
|
||||
{
|
||||
"name": "Proxying",
|
||||
"content": "Proxying through PluralKit lets system members have their own faux-account with their name and avatar.\nYou'll type a message from your account in *proxy tags*, and PluralKit will recognize those tags and repost the message with the proper details, with the minor caveat of having the **[BOT]** icon next to the name (this is a Discord limitation and cannot be circumvented).\n\nTo set up a member's proxy tag, use the `pk;member <name> proxy [example match]` command.\n\nYou'll need to give the bot an \"example match\" containing the word `text`. Imagine you're proxying the word \"text\", and add that to the end of the command. For example: `pk;member John proxy [text]`. That will set the member John up to use square brackets as proxy tags. Now saying something like `[hello world]` will proxy the text \"hello world\" with John's name and avatar. You can also use other symbols, letters, numbers, et cetera, as prefixes, suffixes, or both. `J:text`, `$text` and `text]` are also examples of valid example matches."
|
||||
}
|
||||
]
|
||||
},
|
||||
"footer": "By @Ske#6201 | GitHub: https://github.com/xSke/PluralKit/"
|
||||
}
|
@ -1,131 +1,6 @@
|
||||
system_commands = """
|
||||
__**System commands**__
|
||||
Commands for adding, removing, editing, and linking systems, as well as querying fronter and front history.
|
||||
```
|
||||
pk;system [system]
|
||||
pk;system new [system name]
|
||||
pk;system rename [new name]
|
||||
pk;system description [new description]
|
||||
pk;system avatar [new avatar URL]
|
||||
pk;system tag [new system tag]
|
||||
pk;system timezone [city/town]
|
||||
pk;system delete
|
||||
pk;system [system] fronter
|
||||
pk;system [system] fronthistory
|
||||
pk;system [system] frontpercent
|
||||
pk;system [system] list
|
||||
pk;link <@other account>
|
||||
pk;unlink
|
||||
```
|
||||
""".strip()
|
||||
import json
|
||||
import os.path
|
||||
|
||||
member_commands = """
|
||||
__**Member commands**__
|
||||
Commands for adding, removing, and modifying members, as well as adding, removing and moving switches.
|
||||
```
|
||||
pk;member new <member name>
|
||||
pk;member <member>
|
||||
pk;member <member> rename <new name>
|
||||
pk;member <member> description [new description]
|
||||
pk;member <member> avatar [new avatar URL/@username]
|
||||
pk;member <member> proxy [example match]
|
||||
pk;member <member> pronouns [new pronouns]
|
||||
pk;member <member> color [new color]
|
||||
pk;member <member> birthday [new birthday]
|
||||
pk;member <member> delete
|
||||
pk;switch <member> [<other member>...]
|
||||
pk;switch move <time to move>
|
||||
pk;switch out
|
||||
pk;switch delete
|
||||
```
|
||||
**Please bear in mind that your avatar image has to have 1 dimension 1024 pixels or less, i.e. 1024x2000 or 2500x1024, and be 1 MB or less in size otherwise it will not stick!**
|
||||
""".strip()
|
||||
|
||||
help_commands = """
|
||||
__**Help commands**__
|
||||
```
|
||||
pk;help
|
||||
pk;help commands
|
||||
pk;help system
|
||||
pk;help member
|
||||
pk;help proxy
|
||||
```""".strip()
|
||||
|
||||
other_commands = """
|
||||
__**Other commands**__
|
||||
```
|
||||
pk;log <log channel>
|
||||
pk;message <message ID>
|
||||
pk;invite
|
||||
pk;import
|
||||
pk;export
|
||||
pk;token
|
||||
pk;token refresh
|
||||
```
|
||||
""".strip()
|
||||
|
||||
command_notes = """
|
||||
__**Command notes**__
|
||||
Parameters in <angle brackets> are required, [square brackets] are optional. **Do not include the brackets themselves when using the command.**
|
||||
Member references can be a member ID or, for your own system, a member name. **If a member name contains spaces, it must be wrapped in "quotation marks" when being referenced (but not during creation).**
|
||||
Leaving an optional parameter blank will often clear the relevant value.
|
||||
""".strip()
|
||||
|
||||
all_commands = """
|
||||
{}
|
||||
{}
|
||||
{}
|
||||
{}
|
||||
{}
|
||||
""".strip().format(system_commands, member_commands + "\n", help_commands, other_commands, command_notes)
|
||||
|
||||
proxy_guide = """
|
||||
__**Proxying**__
|
||||
Proxying through PluralKit lets system members have their own faux-account with their name and avatar.
|
||||
You'll type a message from your account in *proxy tags*, and PluralKit will recognize those tags and repost the message with the proper details, with the minor caveat of having the **[BOT]** icon next to the name (this is a Discord limitation and cannot be circumvented).
|
||||
|
||||
To set up a member's proxy tag, use the `pk;member <name> proxy [example match]` command.
|
||||
|
||||
You'll need to give the bot an "example match" containing the word `text`. Imagine you're proxying the word "text", and add that to the end of the command.
|
||||
For example: `pk;member John proxy [text]`. That will set the member John up to use square brackets as proxy tags.
|
||||
Now saying something like `[hello world]` will proxy the text "hello world" with John's name and avatar.
|
||||
You can also use other symbols, letters, numbers, et cetera, as prefixes, suffixes, or both. `J:text`, `$text` and `text]` are also examples of valid example matches.
|
||||
|
||||
**Notes**
|
||||
You can delete a proxied message by reacting to it with the :x: emoji from the sender's account.
|
||||
""".strip()
|
||||
|
||||
root = """
|
||||
__**PluralKit**__
|
||||
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.
|
||||
|
||||
**Who's this for? What are systems?**
|
||||
Put simply, a system is a person that shares their body with at least 1 other sentient "self". This may be a result of having a dissociative disorder like DID/OSDD or a practice known as Tulpamancy, but people that aren't tulpamancers or undiagnosed and have headmates are also systems.
|
||||
|
||||
**Why are people's names saying [BOT] next to them? What's going on?**
|
||||
These people are not actually bots, this is simply a caveat to the message proxying feature of PluralKit.
|
||||
Type `pk;help proxy` for an in-depth explanation.
|
||||
|
||||
__**Getting started**__
|
||||
To get started using the bot, try running the following commands.
|
||||
**1**. `pk;system new` - Create a system if you haven't already
|
||||
**2**. `pk;member add John` - Add a new member to your system
|
||||
**3**. `pk;member John proxy [text]` - Set up square brackets as proxy tags
|
||||
**4**. You're done!
|
||||
|
||||
**5**. Optionally, you may set an avatar from the URL of an image with:
|
||||
`pk;member John avatar [link to image]`
|
||||
Type `pk;help member` for more information.
|
||||
|
||||
**Useful tip:**
|
||||
You can delete a proxied message by reacting to it with :x: (if you sent it!).
|
||||
|
||||
|
||||
__**More information**__
|
||||
For a full list of commands, type `pk;help commands`.
|
||||
For a more in-depth explanation of message proxying, type `pk;help proxy`.
|
||||
If you're an existing user of the Tupperbox proxy bot, type `pk;import` to import your data from there.
|
||||
|
||||
__**Support server**__
|
||||
We also have a Discord server for support, discussion, suggestions, announcements, etc: <https://discord.gg/PczBt78>
|
||||
""".strip()
|
||||
helpfile = None
|
||||
with open(os.path.dirname(__file__) + "/help.json", "r") as f:
|
||||
helpfile = json.load(f)
|
||||
|
Loading…
x
Reference in New Issue
Block a user