Unofficial Dynamic Help Command for interactions.py
Project description
Dynamic Help
Description
A dynamically generated help command for interactions.py that allows for >100 character command descriptions
Usage
Install via pypi
pip install interactions-dynamic-help
Then load the extension into your bot
from interactions import Client
bot = Client()
...
bot.load_extension("interactions.ext.dynhelp")
bot.start("Token")
Using longer descriptions
Longer description is done with a docstring.
If you are using a docstring longer than 100 chars, you MUST provide a description in the slash_command, otherwise the docstring will be used as the description
from interactions import Client, slash_command
bot = Client()
@slash_command(
name="test",
description="This is a test command",
)
async def test(ctx):
"""This is a test command (parsed as a short description and ignored if a long description is provided)
This is a longer description that will be used in the help command and is longer than 100 chars
- this is parsed as part of the long description
"""
await ctx.respond("Test")
bot.load_extension("interactions.ext.dynhelp")
bot.start("Token")
You can specify to combine the short and long description by adding combine=True
to the decorator
bot.load_extension("interactions.ext.dynhelp", combine=True)
Skipping commands and/or options
By defualt the ctx
and bot
parameters are skipped, but you can skip more by adding skip_coms
adn skip_opts
to
the decorator
bot.load_extension("interactions.ext.dynhelp", skip_coms=["test"], skip_opts=["test"])
Custom args to the paginator
These can be added by adding paginator_args
to the decorator, your args will be added to the default args which are
{
"ephemeral": true,
"delete_after": 60
}
bot.load_extension("interactions.ext.dynhelp", paginator_args={"timeout": 60})
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for interactions_dynamic_help-1.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 230babf21dfb17a13ac4d105a59eb7f8e32bdb8e78c437ad5c2e6dbc17d52867 |
|
MD5 | ddf5722df38c8b060f863b4e6c35af0b |
|
BLAKE2b-256 | 0f232a7b0646483cdca11d28a73bf3e6c05b884dc38d63c20a6673769d3906fc |
Hashes for interactions_dynamic_help-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ba7a51980c86a9feb1bb5e31bed3b2ddf80080784d73eca3533b43ef478d637 |
|
MD5 | 5757d732df3f1059edb13c9231b38e66 |
|
BLAKE2b-256 | 322c41aaa8964be91f2d3b12985b8e1f068e42d534616b5eaf1ae53ea4df2d66 |