Hybrid Commands: Slash Commands + Prefixed Commands | discord.py

Опубликовано: 18 Март 2026
на канале: Digiwind
12,618
189

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:    • discord.py  

Install discord.py v2.0: pip install discord.py

More information about slash commands in discord.py:    • (Updated!) How to Make Slash Commands in D...  

Documentation:
Hybrid Command: https://discordpy.readthedocs.io/en/l...
Context: https://discordpy.readthedocs.io/en/l...
commands.Bot: https://discordpy.readthedocs.io/en/l...
has_permissions: https://discordpy.readthedocs.io/en/l...
on_command_error: https://discordpy.readthedocs.io/en/l...
setup_hook: https://discordpy.readthedocs.io/en/l...
tree.sync: https://discordpy.readthedocs.io/en/l...

Code used in this video: https://github.com/Digiwind/Digiwind-...

Discord Server:   / discord  
Twitter (@Digiwind_YT):   / 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