Hybrid Commands: Slash Commands + Prefixed Commands | discord.py
In this video, we work on a hybrid command (slash command + prefixed command) with a permissions check in discord.py v2.0.
If you found this video helpful, please do consider liking the video, subscribing, and sharing it to someone who might find this video helpful (I know a lot of people say this, but it really does help the channel ?). If you have any questions, feel free to comment in the comments section or join our Discord Server (discord.gg/M6eFU3HrUn)!
Make sure you add the *applications.commands* scope to your bot's invite, when you invite it!
More discord.py videos: https://youtube.com/playlist?list=PLCIQvOC0Sg6YwRMu7SPaNzVMiFgVOosS2
Install discord.py v2.0: pip install discord.py
More information about slash commands in discord.py: https://youtu.be/PgN9U1wBTAg
Documentation:
Hybrid Command: https://discordpy.readthedocs.io/en/latest/ext/commands/api.htm #discord.ext.commands.hybrid_command
Context: https://discordpy.readthedocs.io/en/latest/ext/commands/api.htm #discord.ext.commands.Context
commands.Bot: https://discordpy.readthedocs.io/en/latest/ext/commands/api.htm #discord.ext.commands.Bot
has_permissions: https://discordpy.readthedocs.io/en/latest/ext/commands/api.htm #discord.ext.commands.has_permissions
on_command_error: https://discordpy.readthedocs.io/en/latest/ext/commands/api.htm #discord.ext.commands.Bot.on_command_error
setup_hook: https://discordpy.readthedocs.io/en/latest/ext/commands/api.htm #discord.ext.commands.Bot.setup_hook
tree.sync: https://discordpy.readthedocs.io/en/latest/interactions/api.htm #discord.app_commands.CommandTree.sync
Code used in this video: https://github.com/Digiwind/Digiwind-Videos/blob/main/dpy-hybrid-command.py
Discord Server: https://discord.gg/M6eFU3HrUn
Twitter (@Digiwind_YT): https://twitter.com/Digiwind_YT
Top.gg: https://top.gg/user/512025208542986241
GitHub (Digiwind): https://github.com/Digiwind
Official Discord.py Server: discord.gg/dpy
Chapters:
0:00-0:26 Intro
0:26-1:21 Documentation
1:21-01:28 Imports
01:28-01:58 Bot Subclass
01:58-2:33 Syncing Slash Commands with Setup Hook
02:33-02:51 Slash Command Syncing Ratelimit
02:51-03:43 Hybrid Command
03:43-03:55 Permissions Check
03:55-04:22 Error Handler
04:22-04:50 Running the Code & Debugging
04:50-05:06 Testing the Permissions Check
05:06-05:32 Rerunning the Code
05:32-05:42 Outro
#discordpy #hybridcommands #dpy #digiwind #slashcommands #hybridcommands
Видео Hybrid Commands: Slash Commands + Prefixed Commands | discord.py автора Мастерская CSS
Видео Hybrid Commands: Slash Commands + Prefixed Commands | discord.py автора Мастерская CSS
Информация
27 ноября 2023 г. 11:24:48
00:05:42
Похожие видео