Better interactions with your users thanks to Modals with discord py

Sdílet
Vložit
  • čas přidán 1. 11. 2022
  • In this video, I'll be showing you how you can create great user experiences with your discord bots using the Modals technique. This allows you to create custom dialogs that your users can interact with, allowing you to create even more dynamic and interactive experiences.
    🔗 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 • 11

  • @remqsi
    @remqsi Před 11 měsíci

    omg thank you so much for this! i have been trying to find a tutorial for these for… way too long, and you randomly popped up on my home page

  • @biscotty6669
    @biscotty6669 Před rokem +4

    Another great video. Just wanted to point out that you can get your channel ID by right-clicking on the channel and choosing "Copy ID" at the bottom. (Developer Mode must be enabled in advanced settings afaik.)

  • @PolyShifter
    @PolyShifter Před rokem

    just curious, I've seen you do it in multiple other videos, but you are adding an attribute to the class when you specify `feedback_modal.user`, but shouldn't that take place in the `__init__()`? Or is it still safe to do so as you are?

  • @arainboldt
    @arainboldt Před rokem +1

    When I decorate the command function with `bot.tree.command` it says that no command is found, but when I decorate with `bot.command` it provides a context object instead of an interaction object. what's the proper way to do this?

  • @nxr_found9966
    @nxr_found9966 Před 3 měsíci

    Hey, how do I make that debug command?

  • @airidasrom583
    @airidasrom583 Před 5 měsíci

    is it possible to add drop down in the menu ?

  • @KleCat
    @KleCat Před rokem

    when I run the code, I keep getting this error:
    AttributeError: type object 'TextInput' has no attribute 'short'
    I followed your tutorial exactly D:

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

      it's textstyle

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

      @@Verfi sorry I figured it out ages ago, thanks tho

  • @user-sc4gj1tv3o
    @user-sc4gj1tv3o Před 3 měsíci

    when i run the code i got this error:
    Traceback (most recent call last):
    File "c:\Users\gogol\Desktop\bot.py", line 10, in
    class FeedbackModal(discord.ui.Modal, title="Ta des suggestions ?"):
    File "c:\Users\gogol\Desktop\bot.py", line 11, in FeedbackModal
    fb_title = discord.ui.TextInput(style=discord.TextStyle.short,label="Titre",required=False,placeholder="Donne moi un titre wesh")
    AttributeError: module 'discord.ui' has no attribute 'TextInput'
    anyone can help me please ?