How To Add Autocompletion To Your Discord Slash Commands

Sdílet
Vložit
  • čas přidán 31. 10. 2022
  • In this video we enable autocomplete on our application command options to give our users a better experience.
    🔗 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 • 16

  • @AGuard
    @AGuard Před rokem +3

    Your work helps me a lot thanks! Don't stop this

  • @asoniox
    @asoniox Před 10 měsíci +1

    Countless hours spent searching the internet and no results. This video summed up what I wanted to do perfectly. Thank you!

  • @almuaz
    @almuaz Před rokem +1

    Thanks, i was stuck for hours.

  • @WilliamWonker
    @WilliamWonker Před 2 měsíci

    Thanks! The docs aren't the most helpful sometimes, this was excellent.

  • @ThatLadLegend
    @ThatLadLegend Před 10 měsíci

    How could I do this dynamically? Like to get the currently loaded cogs?
    Figured it out like 5 minutes later lmao.

  • @narayan8778
    @narayan8778 Před rokem +4

    How would you add 2 arguments where the options displayed for the second one are dependent on the choice of the first. Like first argument could be "state" and depending on that the second one displays the cities in that state .

    • @bubfusion
      @bubfusion Před 2 měsíci

      Did you ever figure it out? I'm trying to do the same thing

  • @pointlesssssxddxdxd
    @pointlesssssxddxdxd Před rokem

    i have a error "TypeError: issubclass() arg 1 must be a class". how can i fix that?

  • @Jonathannavaxd
    @Jonathannavaxd Před 18 dny

    I'm doing exactly the same thing as you and I can't get autocomplete on discord.

  • @MrBossclub
    @MrBossclub Před 10 měsíci

    Can i use insted of items to load list from enum class event list? And load only 25 first and then of user try to type in something in the option, the bot will give new choice results based on matches in enum list?

    • @kukackis5051
      @kukackis5051 Před 6 měsíci

      i belive if u breake the for loop at 25 items that should work

  • @justskiez9584
    @justskiez9584 Před rokem

    Great video. Do you know how to add a description to an option?

    • @richardschwabe
      @richardschwabe  Před rokem +1

      The app_commands.Choice does not allow for a description, only localized names and values.
      However, the SelectOption has a description attribute.

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

    Even simple slash commands with Literals do autocomplete automatically without this. Why do we need separate autocomplete command?

    • @codi7318
      @codi7318 Před rokem +1

      for example if you want to load data from a database which may be different every time you run the command or when searching the web via a command or sth

  • @CrunchySpon
    @CrunchySpon Před rokem

    TypeError: unknown parameter given: item