How to Organize your Application Commands with Groups in Discordpy2

Sdílet
Vložit
  • čas přidán 14. 06. 2024
  • In this video we group our application commands (SlashCommands) in discord py and also load them as extensions from a different file. Lastly we discover the limitations of groups and look at various parameters.
    🔗 URLs 🔗
    - discordpy.readthedocs.io/en/s...
    🗃️Github Project URL🗃️
    - github.com/richardschwabe/dis...
    🏆About this course🏆
    My updated course: "How to make a discord bot" with discord.py 2.x covers everything you need to know to raise productivity and user activity on your discord server. By following this course you will learn everything you need to create a successful bot. Resulting in a professional, community driven and feature rich successful discord server.
    The initial videos cover all necessary elements to create anything you want with discordpy, this includes:
    - Registering a discord bot and inviting it to your server
    - Setting up the python project with extra logging functionality
    - Introduction to basic discordpy bot command structure
    - Automatically load bot commands from separate files
    - Handling user input with discordpy converters in a bot instance
    - Handling errors during command execution
    - Grouping commands together for better command organisation
    - Creating discordpy COG (command collections)
    - Loading COG extensions automatically from files
    - Creating checks to limit access on bot commands
    - DMs & "only you can see this" messages
    - Hybrid commands to have both custom bot commands but also "SlashCommands"
    - Dedicated Slashcommands
    - Application commands in context menus for Members and Messages
    - Decorators for Slashcommands
    - Transform any user input in Slashcommands
    - Handling autocompletion and filtering of Slashcommand user input
    - Send rich text embeds with pictures, links and tables
    - Create Views with Buttons for even better user interactions
    - Showing Modals with Selects, TextInputs and Buttons
    🎥Playlist 🎥
    • How to create a DISCOR...
    ❤Community❤
    To support the channel and see more tutorials about technologies:
    👉LIKE & SUBSCRIBE to the channel:
    czcams.com/users/subscription_c...
    👉Join us on our discord server: / discord
    🌲My Linktr.ee 🌲
    linktr.ee/richardschwabe
    🗃️Code to my videos can be found on Github: github.com/richardschwabe
    👉Comment below the video for feedback, suggestions, wishes or if you have spotted a mistake!
    🏷️ Tags 🏷️
    how to make a discord bot,python tutorial,discord bot,discord music bot,python discord bot,discord bot maker,discord py,best discord bots 2022,discordpy,discord bot client,create discord bot python,slash commands discord.py,discord py 2.0,create slash commands discord.py,discord.py slash commands,discordpy cogs,discord.py buttons, discord.py tutorial, discord.py tutorial 2023
    © Created by Richard Schwabe with ❤ ©
    Music License: CZcams Audio Library
    Website: www.richardschwabe.de
    All code examples fall under GNU General Public License v3.0
    We do not recommend using code shown in tutorials or on our Github public repository to run in production environment and should be used for education only.
    We cannot be held liable for any damage caused by the code or do not provide any warranty.
  • Věda a technologie

Komentáře • 8

  • @lanitt
    @lanitt Před rokem

    Hi! Great video. I have one question: now that you've made a commands group named "help", is it possible to create a command that is simply "/help"? I tried creating one, but since there already is a group with that name, I wasn't able to.

  • @sharkkk2314
    @sharkkk2314 Před 9 měsíci

    So, I want to give each Sub command a description since it shows as ... description="anything" Doesnt work

  • @agentlonestar007
    @agentlonestar007 Před 7 měsíci +1

    How do you load the group in the setup function in the cog?
    bot.tree.add_command() is not working for me, so I assume the method has changed.

  • @_Astro.Nish_
    @_Astro.Nish_ Před rokem

    What is the use of this grouping?
    I mean, I have a commands named-> /ping /invite /vote and I can simply type them to get result.
    but if I add them to a group named-> Extra then I need to always type -> /extra ping /extra invite /extra vote (I mean i dont need to type them it gets autopopulated but still it looks useless that always /extra is added infront fo them)
    What is the use of that grouping actually?

    • @whitestone4107
      @whitestone4107 Před rokem

      In my opinion, groups are useful when you basically need different options of executing your command. For example, you have a /help command and you want to separate it for different categories of commands such as staff, extras, etc. You could do this by creating a group of help command and adding staff, extra as subcommands of the group, which would look like /help staff and /help extra. Yes, you could also achieve this by setting the arguments inside the help command instead, but groups would make it cleaner by not displaying the extra arguments.

    • @CrunchySpon
      @CrunchySpon Před rokem +1

      i mean i think it is pretty obvious. It is to add spaces to commands that have 2+ words and to organise them mostly. If you have commands that are only 1 word then don't add them to a group, but for example in my case i have a bunch of commands that start with /channel so I made a group for those commands.

  • @sea_player
    @sea_player Před 8 měsíci

    so fck good thanks bro for video