discord-interactions slash command help
Project description
slash-help
discord-py-interactions slash command help
Join our Discord server to ask questions, report bugs, or suggest features!
Install:
pip install -U slash-help
Requirements (automatically installed when installing slash-help):
- discord-py-interactions (version 3.0.2)
- discord.py (version 1.7.3)
- dinteractions-Paginator
- thefuzz
- Levenshtein
Example:
Usage:
from discord_slash import SlashCommand
from discord.ext import commands
from slash_help import SlashHelp
bot = commands.Bot("your_prefix", help_command=None)
slash = SlashCommand(bot, sync_commands=True) # sync_commands=True preferred
help_slash = SlashHelp(bot, slash, "your_bot_token", dpy_command=True) # if you want a dpy command as well, and to show dpy commands in the help
# and its done!
More customized:
from discord_slash import SlashCommand
from discord.ext import commands
from slash_help import SlashHelp
bot = commands.Bot("your_prefix", help_command=None)
slash = SlashCommand(bot, sync_commands=True) # sync_commands=True preferred
help_slash = SlashHelp(bot, slash, "your_bot_token", dpy_command=True, auto_create=False)
@bot.command()
async def help(ctx, *, command=None):
await help_slash.send_help(ctx, command, prefix="your_prefix") # you can override the prefix here
# and also in SlashHelp()
@slash.slash(name="help")
async def _help(ctx, command=None):
await help_slash.send_help(ctx, command)
class SlashHelp
Arguments:
Required:
bot
:Union[commands.Bot, discord.Client]
- the bot variableslash
:SlashCommand
- the slash variabletoken
:str
- the bot token, required for fetching slash commands from Discord API
Optional:
guild_ids
:Optional[List[int]] = None
- a list of guild/server IDs to register the help slash command
Keyword Arguments:
color
:Optional[discord.Color] = discord.Color.default()
- the color of the embedcolour
- alias ofcolor
timeout
:Optional[int] = 60
- the number of seconds till paginator timeout, specifyNone
for no timeoutfields_per_embed
:Optional[int] = 4
- the number of fields per embedfooter
:Optional[str] = None
- footer for the embedsfront_description
:Optional[str] = None
- description in the first embedno_category_name
:Optional[str] = "No Category"
- value for the No Category fieldno_category_description
:Optional[str] = "No description"
- value for the No Category description fieldextended_buttons
:Optional[bool] = True
- to use the first and last buttonsuse_select
:Optional[bool] = True
- whether to use the selectauthor_only
:Optional[bool] = False
- whether to have buttons work only for the authoruse_subcommand
:Optional[bool] = False
- to have a subcommand/help bot_name
bot_name
:Optional[str] = None
- needed to useuse_subcommand
dpy_command
:Optional[bool] = False
- whether to make a discord.py command as wellmax_search_results
:Optional[int] = 12
- maximum search resultssync_commands
:Optional[bool] = False
- if you want to get commands every single timeblacklist
:Optional[List[str]] = None
- commands or cogs to blacklist, case sensitiveprefix
:Optional[str] = None
- overridesbot.command_prefix
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
slash_help-2.0.2.tar.gz
(20.9 kB
view hashes)
Built Distribution
slash_help-2.0.2-py3-none-any.whl
(20.0 kB
view hashes)
Close
Hashes for slash_help-2.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7e3f4b01b2d08625b018eee5db8efea5208adb4eb6c198c7acf73a9d66fbd80 |
|
MD5 | 2051f3140a1bdb49cf6548410ae51266 |
|
BLAKE2b-256 | 73816d42f7ad93fc590bf0c3893b8f838304b2f1a4d4a5c7303eca4a5e772cd0 |