banner



How To Register Your Name On Discord


discord-ui

A discord.py extension for using discord ui/interaction features
pip packageread the docsexamples

Downloads PyPI PyPI - Python Version Codacy Badge

Introduction

This is a discord.py ui extension made by 404kuso and RedstoneZockt for using discord'due south newest ui features like buttons, slash commands and context commands.

Documentation

Installation

Windows

py -one thousand pip install discord-ui        

Linux

python3 -one thousand pip install discord-ui        

License

This project is nether MIT License

Issues

If yous observe any issues, delight study them

https://github.com/discord-py-ui/discord-ui/issues

Note

If y'all desire to employ slash commands, in the oauth2 invite link generation, you accept to bank check both bot and awarding.commands fields

Instance

Example for creating a unproblematic slash control

          import          discord          from          discord.ext          import          commands          from          discord_ui          import          UI          ,          SlashOption          customer          =          commands          .          Bot          (          " "          )          ui          =          UI          (          customer          )          @ui          .          slash          .          command          (          "hello_world"          ,          options          =          [          SlashOption          (          bool          ,          "absurd"          ,          "whether this libary is absurd"          ,          required          =          False          )],          guild_ids          =          [          785567635802816595          ])          async          def          control          (          ctx          ,          cool          =          True          ):          """This is a uncomplicated slash command"""          # you can use docstrings for the slash control description too          await          ctx          .          answer          (          "You said this libary is "          +          str          (          cool          ))          customer          .          run          (          "your_token"          )        

Case for creating a user-context command

          import          discord          from          discord.ext          import          commands          from          discurd_ui          import          UI          client          =          commands          .          Bot          (          " "          )          ui          =          UI          (          customer          )          @ui          .          slash          .          user_command          (          "avatar"          ,          guild_ids          =          [          785567635802816595          ])          async          def          avatar          (          ctx          ,          user          :          discord          .          Member          ):          """Sends the avatar of a user"""          await          ctx          .          answer          (          embed          =          discord          .          Embed          (          description          =          user          .          display_name          )          .          set_image          (          url          =          user          .          avatar_url          ))          client          .          run          (          "your_token"          )        

Instance for autocompletion of choices

          import          discord          from          discord_ui          import          UI          ,          SlashOption          ,          AutocompleteInteraction          async          def          generator          (          ctx          :          AutocompleteInteraction          ):          available_choices          =          [          "hmm"          ,          "this"          ,          "is"          ,          "a"          ,          "an"          ,          "test"          ,          "testing"          ]          return          [(          x          ,          10          )          for          x          in          available_choices          if          x          .          startswith          (          ctx          .          value_query          )]          @ui          .          slash          .          command          (          "search_word"          ,          options          =          [          SlashOption          (          str          ,          "query"          ,          choice_generator          =          generator          )])          async          def          search_word          (          ctx          ,          query          ):          expect          ctx          .          send          (          "got "          +          query          +          " for query"          )          client          .          run          (          "your_token"          )        

Example for sending a button and receiving information technology

          import          discord          from          discord.ext          import          commands          from          discord_ui          import          UI          ,          LinkButton          ,          Button          from          asyncio          import          TimeoutError          client          =          commands          .          Bot          (          " "          )          ui          =          UI          (          client          )          @customer          .          listen          (          "on_message"          )          async          def          on_message          (          message          :          discord          .          Message          ):          if          bulletin          .          content          ==          "!btn"          :          msg          =          look          bulletin          .          channel          .          send          (          "you lot"          ,          components          =          [          [          Push          (          "press me"          ,          color          =          "green"          ),          LinkButton          (          "https://discord.com"          ,          emoji          =          "😁"          )],          Button          (          custom_id          =          "my_custom_id"          )          ])          try          :          btn          =          await          msg          .          wait_for          (          "button"          ,          client          ,          by          =          bulletin          .          author          ,          timeout          =          20          )          await          btn          .          respond          (          "you pressed `"          +          btn          .          content          +          "`"          )          except          TimeoutError          :          look          msg          .          delete          ()          customer          .          run          (          "your_token_here"          )        

Example for sending Selectmenus and receiving them

          import          discord          from          discord.ext          import          commands          from          discord_ui          import          UI          ,          SelectMenu          ,          SelectOption          from          asyncio          import          TimeoutError          client          =          commands          .          Bot          (          " "          )          ui          =          UI          (          client          )          @client          .          mind          (          "on_message"          )          async          def          on_message          (          message          :          discord          .          Message          ):          if          message          .          content          ==          "!sel"          :          msg          =          await          message          .          channel          .          send          (          "yous"          ,          components          =          [          SelectMenu          (          options          =          [          SelectOption          (          "my_value"          ,          characterization          =          "test"          ,          clarification          =          "this is a test"          ),          SelectOption          (          "my_other_value"          ,          emoji          =          "🤗"          ,          description          =          "this is a test too"          )          ],          "custom_id"          ,          max_values          =          2          )])          try          :          sel          =          await          msg          .          wait_for          (          "select"          ,          customer          ,          by          =          message          .          author          ,          timeout          =          20          )          await          sel          .          reply          (          "you selected `"          +          str          ([          x          .          content          for          ten          in          sel          .          selected_options          ])          +          "`"          )          except          TimeoutError          :          await          msg          .          delete          ()          customer          .          run          (          "your_token_here"          )        

Instance for cogs

          from          discord.ext          import          commands          from          discord_ui          import          UI          from          discord_ui.cogs          import          slash_command          ,          subslash_command          ,          listening_component          bot          =          commands          .          Bot          (          " "          )          ui          =          UI          (          bot          )          class          Example          (          commands          .          Cog          ):          def          __init__          (          self          ,          bot          ):          cocky          .          bot          =          bot          @slash_command          (          name          =          "instance"          ,          guild_ids          =          [          785567635802816595          ])          async          def          example          (          self          ,          ctx          ):          await          ctx          .          answer          (          "gotchu"          )          @subslash_command          (          base_names          =          "case"          ,          name          =          "command"          ):          async          def          example_command          (          self          ,          ctx          ):          await          ctx          .          respond          (          "okayy"          )          bot          .          add_cog          (          Example          (          bot          ))          bot          .          run          (          "your token"          )        

Yous can find more (and better) examples here

Contact

You can contact us on discord

  • Redstone
  • kuso
  • discord server

Changelog

This will be moved to https://discord-py-ui.github.io/discord-ui/

  • 5.1.2

    Fixed

    • commands.nuke
    • nextcord import event (#112)
  • 5.i.0

    Breaking changes

    • Component custom ids are at present optional, if no custom id is passed, a 100 characters long random string volition be used and considering of that the social club of Component init params changed
    • The order of SelectMenus init params inverse, custom_id comes now subsequently options
                    SelectMenu                (                "my_custom_id"                ,                [                options                ...                here                ])                # is now                SelectMenu                ([                options                ...                here                ],                "my_custom_id"                )              
    • Same for Buttons
                    Push                (                "my_custom_id"                ,                "label"                )                # is now                Button                (                "label"                ,                "my_custom_id"                )              
    • ButtonStyles is now ButtonStyle
    • renamed cog decorators, the old ones however work but they will testify a deprecation warning: slash_command -> slash_command, subslash_command -> subslash_command, context_cog -> context_command, listening_component -> listening_component
    • Removed Slash.edit_command and Slash.edit_subcommand, "moved" to Control.edit
    • SlashedCommand is at present SlashInteraction, SlashedSubCommand is now SubSlashInteraction and SlashedContext is now ContextInteraction
    • The command attributes of CommandInteractions (SlashedCommand, ...) are at present moved to Interaction.command. (the .control attribute is a reference to the real command, if you change backdrop of the command they will be updated)
    • The component attributes of an interaction are at present moved to .component
    • ContextCommands .param attribute is now .target

    Changed

    • argument_type in SlashOption is at present type
    • ButtonStyle value names inverse: color names are now capitalized and Danger is now Destructive
    • Listener.target_user is now Listener.target_users and can take users, members and ids as the value
    • BaseCommand.options and SlashOption.options is now of blazon SlashOptionCollection, which allows you to acces options by alphabetize and name
                    my_command                .                options                [                "option name"                ]                # or                my_command                .                options                [                0                ]              

    You lot can also use some methods like .get, .set (which will return itself subsequently it set up something, and so SlashOption.gear up(primal, value).fix(key, value) would piece of work) and SlashOption.options + SlashOption.option volition add both SlashOptions together

    • If an invalid guild id was passed to a slashcommand, no exception will be raised anymore, it volition merely be printed into the console and ignored logging.error()
    • Moved the discord_ui.ext.py module into a folder
    • on_button_press and on_menu_select is at present on_button and on_select. The quondam event names will withal work merely volition be removed in the side by side release

    Fixed

    • disable_action_row
    • ActionRow.disable
    • no interaction events beingness dispatched because subclasses of dpy2 commands.Bot instances wouldn't get overriden which lead to not enabling needed debug events
    • when no matching component listener in Listener could exist institute, the events for components events wouldn't exist dispatched
    • delete_after keyword in message send override not working
    • mentionable blazon in slashoptions not existence parsed to objects
    • @discord.ext.commands.Cooldown not working on cog slashcommands

    Added

    • **fields to all functions that edit the message components (like .disable_components, .disable_component, ...). The **fields parameter can be used to edit other properties of the message without using .edit again and send a "useless" request
    • @Lister.on_error and @Listener.wrong_user decorators for handling Exceptions in Listeners
    • When no keyword was passed to @Listener.push or @Listener.select, the function will be called on every button/slect
    • channel_type to SlashOption, listing of discord.ChannelType. This will restrict the shown channels for channel slash options to this list.
    • back up for nextcord. Other libs should work as well, only they are non tested.
    • Mentionable type for SlashOptions
    • description for short slashoptions. If you set the options for a slash command via callback params, you can add a clarification (and a type) to them with your docstring. There are 3 unlike styles yous can employ:
                    # style 1                @ui                .                slash                .                command                ()                async                def                my_command                (                ctx                ,                my_option                ,                my_other_option                ):                """This is my command description                                  my_option: `int`:                                  This is the description for the my_option parameter                                  my_other_option: `str`:                                  This is the description for another option                                  """                ...                # style 2                @ui                .                slash                .                command                ()                async                def                my_command                (                ctx                ,                my_option                :                int                ,                my_other_option                :                str                ):                """This is my control description                                  my_option: This is the description for the my_option parameter                                  my_other_option: This is the clarification for another option                                  """                ...                # way iii                @ui                .                slash                .                control                ()                async                def                my_command                (                ctx                ,                my_option                ,                my_other_option                :                str                ):                """This is my command clarification                                  `int`: This is the description for the my_option parameter                                  This is the description for some other option                                  """                ...              

    Note: You lot don't have to utilise `type`, y'all tin can just use type

    • Empty descriptions for slashcommands and slashoptions. The default description value is now \u200b which is an "empty" char
    • Modifying slashcommand options is at present WWAAYYYY easier. You tin can only practise .options[name or index].proper name = "new proper name" and the option will be updated
    • You tin can set the autocomplete option generator with a decorator now
                    ui                .                slash                .                command                (                options                =                [                SlashOption                (                str                ,                "my_option"                )])                async                def                my_command                (                ctx                ,                my_option                ):                ...                @my_command                .                options                [                "my_option"                ]                .                autocomplete_function                async                def                my_generator                (                ctx                ):                ...                # or                @my_command                .                options                [                0                ]                .                autocomplete_function                async                def                my_generator                (                ctx                ):                ...              
    • All apllication control decorators will now return the created Command
                    @ui                .                slash                .                command                (                ...                )                async                my_command                (                ctx                ):                ...                type                (                my_command                )                # SlashCommand              
    • Added edit and delete method to slashcommand. Y'all tin can utilize this for editing or deleting the command subsequently
                    # edit                await                my_command                .                edit                (                name                =                "test"                )                # delete                await                my_command                .                delete                ()              
    • id to SlashCommand
    • commands_synced event which will be dispatched when all commands where synced with the api (UI.Slash.sync_commands)
    • BaseCommmand.update method which updates the api command with the lcoal changes
    • SlashSubCommand.base of operations, which volition exist shared among all subslashcommands with the same base

    Removed

    • discord.ext.commands.Bot override for enabling the debug event, this will be enabled when creating a UI instance from the bot
  • 5.0.1

    Fixed

    • Choices not working
  • 5.0.0

    Fixed

    • Roles non being parsed correctly

    Inverse

    • default_permission

    default_permission can at present be of type discord.Permissions merely the api doesn't back up that yet.

    • slash http

    some code changes to slash-http features

    Added

    • ChoiceGeneratorContext

    Context course for selection generation

    • SlashOption

    choice_generator keyword and autocomplete keyword. autocomplete is non needed if you pass choice_generator

    • File sending

    You are now able to send hidden files

  • 4.3.8

    Fixed

    • Issue with SlashOptions

    required is at present imitation by default again

  • 4.3.7

    Changed

    • SlashOption

    Required is now True past default

    Fixed

    • AttributeError: 'LinkButton' object has no attribute 'component_type'

    Removed

    • decompressing

    The lib now doesn't decompress byte data anymore, which ways everything earlier the dpy commit 848d752 doesn't work with this lib.

    message reference in discordpy discord server

  • 4.3.half dozen

    Fixed

    • Slashcommand comparing
    • Ephemeralmessage keyerror exception
  • 4.3.v

    Fixed

    • send function issues
  • 4.3.4

    Stock-still

    • SlashOption non accepting tuple
  • iv.3.three

    Fixed

    • fixed TypeError: 'NoneType' object is not iterable
  • 4.3.2

    Fixed

    • Could not find a matching pick type for parameter '<class 'NoneType'>'
  • 4.3.1

    Removed

    • unused parameter
  • iv.3.0

    Fixed

    • Bulletin.wait_for

    past keyword doesn't work properly

    Removed

    • Hash

    Removed the hash property from Buttons and SelectMenus due to the removal of it from the api

    Added

    • discord_ui.ext

    A module with useful tools and decorators to apply more data

    • BaseCommand

    BaseCommand (the superclass for all applicationcommands) has now some extra backdrop:

                    - is_chat_input > Whether this command is a slash command  - is_message_context > Whether this command is a bulletin context command  - is_user_context > Whether this command is a user context command                              
    • SlashedCommand

    Added properties:

                    - is_alias > Whether the invoked control is an alias or not  - aliases > All the available aliases for the control                              
    • Listeners

    Listeners are something that you can use for a better processing of received components. You lot could run into them as a cog to the message components more information

    Changed

    • SelectInteraction

    SelectInteraction.selected_values are not the raw values that were selected, SelectMenu.selected_options are the options of type SlashOption that were selected

    • MISSING => None

    All instance values that were MISSING past default are at present None

  • 4.two.15

    Stock-still

    • #97
  • 4.2.xiv

    Fixed

    • pocket-size SelectOption problems
    • context commands

    Changed

    • permit context commands to have names with spaces
  • 4.2.13

    Fixed

    • TypeError: 'EMPTY' is non a callable object in context commands
  • 4.2.12

    Fixed

    • context commands
  • four.2.11

    Fixed

    • cog context commands returned incorrect type
  • 4.ii.10

    Stock-still

    • cog context commands typo with guild_permission keyword
  • 4.2.8

    Added

    • edit_subcomand

    Fixed

    • print statements

    Fixed

    • #94 (again 💀)
    • received subcommands

    The base_names and the name will be at present set to the right value

  • 4.2.7

    Added

    • on_component

    There is now an event with the name component that will be dispatched whenever a component was received If you use Message.wait_for, there is at present a new upshot option with the name component (message.wait_for("component", client))

    Fixed

    • #94

    DM issue with deleting letters

    Inverse

    • edit

    Edit now takes "content" as not positional (.edit("the content") works now)

    • component lenght

    You are now able to set component values with the right max lenght

  • iv.2.6

    Fixed

    • emebds

    there was an outcome with sending embeds

  • 4.two.five

    Fixed

    • listening_components

    There was an issue with listening components that they needed two parameters but only one was passed Another outcome was TypeError: __init__() missing 1 required positional argument: 'custom_id'?

    • emebds

    there was an issue with sending embeds

  • 4.2.2

    Inverse

    • sync_commands

    the delete_unused keyword is now optional, if y'all don't laissez passer a parameter, slash.delete_unused will be used (from the __init__ function)

  • four.2.one

    Stock-still

    • cannot import proper noun 'InteractionResponseType' from 'discord.enums'
  • 4.2.0

    Added

    • cog_remove sync

    when you remove a cog the slash commands will now get deleted if you fix delete_unused to True and ready sync_on_cog to True

    • alternativ slash options

    you don't have to specify options in ane of the slash decorators anymore. Instead, you can set them in your callback function Instance

                    @ui                .                slash                .                control                ()                async                def                greet                (                ctx                ,                user                ):                # This will add an required option with the name "user" of type "user"                """Greets a user                                                                  Yous can utilise multiline docstrings, considering only the first line will be used for the clarification                                  """                ...                @ui                .                slash                .                command                ()                async                def                tag                (                ctx                ,                target                :                discord                .                User                =                None                ):                # This volition add an optional choice with the name "target" of type "user"                # Note: you could likewise apply target: "user" = None or anything else you lot would use in SlashOption for the type                ...              

    Stock-still

    • sync_commands

    if you would sync the commands subsequently the first sync, it threw an fault

  • 4.ane.four

    Fixed

    • slashcommands in forbidden guilds

    when trying to go slash commands in a guild with no appication.commands permission, it won't throw an exepction anymore

  • 4.one.2

    Stock-still

    • Subcommands editing

    subcommand checks were incorrect and this would issue in errors like In options.0.options.2: Choice proper name 'proper noun' is already used in these options

  • 4.1.1

    Fixed

    • Interaction.writer.voice

    For some reason the phonation belongings of the creator or the interaction would be fix

    • Global slashcommands

    They wouldn't be registered to the api

  • 4.1.0

    Added

    • py three.six < support

    You lot should be able to use this package with python 3.six or newer

    Fixed

    • print

    Forgot to remove print statements💀

  • iv.0.iv

    Fixed

    • slashcommand

    when a user was passed in an option, its guild was ever None

    • context commands

    if no proper name passed, the context command wouldn't take the callback name every bit the name of the command

  • 4.0.3

    Fixed

    • Bulletin.wait_for
  • four.0.2

    Fixed

    • Consequence with receiving context commands
  • 4.0.1

    Fixed

    • discord.ext import error
  • four.0.0

    Added

    You now take much more control over your slash commands!

    • Permissions

    Yous tin can update your permissions with the Slash.update_permissions function

    • Creating commands

    You can at present create slash commands without the decorator in a much more eaisier way! Check out the Slash.add_command function

    • Edit commands

    You tin can edit commands in code with the Slash.edit_command function

    • Listening components

    You tin can add together and remove listening components now with the Components.add_listening_component, Components.remove_listening_component and Components.remove_listening_components functions

    • Cogs

    You can now apply cog decorators similar slash_command, subslash_command and listening_component

    Fixed

    • SlashCommand

    Slash commands wouldn't exist updated if only default_permission was changed

    Changed

    • wait_for

    Message.wait_for now takes by and cheque as parameters and event_name and customer switched place (wait_for(client, "event_name") is now wait_for("event_name", client))

    • listening components

    You can specify listening_components now more presicely, you can add together letters, users, and a check to filter

    • Interaction.fellow member

    Interaction.member is now Interaction.writer

    • listening comonents

    Listening component callback functions now just take ane parameter, the used component

    • on_button_press and on_menu_select

    These events now accept a sole parameter, the used component. If you lot want to acces to message, use passed_component.message

    Removed

    • ResponseMessage

    Removed ResponseMessage

  • 3.3.v

    Fixed

    • SelectMenu

    SelectMenu issue when creating it from data

  • iii.three.4

    Changed

    • edit

    Message.edit now takes a embed parameter

    Fixed

    • print

    Forgot to remove some print statements

  • three.3.3

    Added

    • class representation

    classes take now a __repr__ function

    • UI(override_dpy)

    You lot can now choose whether you lot want to override some of dpy objects and functions (default is True) (see the override module for more information) This also appeals to the Components class (Components(override_dpy)) note: if you don't want to create a UI object, y'all tin instead override dpy with the override_dpy method

                    from                discord_ui                import                override_dpy                override_dpy                ()              

    Fixed

    • dpy2

    discord.py v2 now auto-decompresses socket data and passes a string instead of the uncompressed information.

    • override dpy message

    when overriding dpy message object, the components would mix

  • three.3.2

    Added

    • EphemeralResponseMessage

    Yous can at present edit a imperceptible message which was created from an interaction (ex. when a push button in a hidden bulletin was pressed)

  • three.3.ane

    Added

    • interaction

    Interaction.channel and Interaction.lodge

  • three.3.0

    Stock-still

    • interaction usage in dms
  • 3.ii.9

    Added

    • ratelimit fix

    The lib will now retry after the ratelimit reset and doesn't throw an HTTPException anymore

    Fixed

    • sync_commands

    Got KeyError exception while syncing commands

  • three.2.eight

    Fixed

    • subconscious responding

    When a hidden response was nearly to be transport without defering the interaction it would thrown an error

  • 3.two.7

    Added

    • warnings
      • When a guild_permission with an invalid guild id is passed, it will throw an exception when syncing the commands
      • When the value of a guild_permission is not of blazon SlashPermission it will throw an exception
    • context-commands

    You can at present have context commands with the aforementioned name as a normal slash control

    • slashcommand clarification

    You can utilize docstrings """docstring""" for setting the clarification of a slash commmand by setting the dosctring for the callback function

    Changed

    • auto_defer

    auto_defer is now disabled past default

    • slash sync

    You tin can at present disable auto_sync for slash commmands and sync them by yourself with Slash.sync_commands(delete_unused)

    • Interacion.defer

    Interaction._deferred is not Interaction.deferred and Interaction.defer() doesn't throw an exception anymore, information technology will just log the mistake with logging.error()

    Fixed

    • try

    There was a try/grab in the Interaction.reply part that would allow the code to continue when an exception occured while responding with ninja_mode

    • context commands

    At that place was an upshot adding context-commands

    • Command checking

    Now, the libary only edits commands when changes were made

  • 3.two.6

    Added

    • car ninja_mode

    If you use .respond(), the function will try to utilise ninja_mode automatically

    Changed

    • project

    Moved git-project to https://github.com/discord-py-ui/discord-ui

    Fixed

    • ninja_mode response

    responding with ninja_mode would stop up in an exception

    • file sending

    fixed another file sending outcome with slash commands

  • 3.2.5

    Fixed

    • #89 (thanks for reporting)
  • 3.2.4
    • Stock-still version issues with the package
  • three.2.2

    Fixed

    • #85: AttributeError: module 'discord' has no attribute '_Components__version'
  • iii.2.0

    Fixed

    I'grand really lamentable for all the issues this libary got, if you still find issues, please study them in https://github.com/discord-py-ui/discord-ui/problems

    • SelectOpion

    In that location was an issue with emojis not beingness set in SelectOptions

    • LinkButton

    There was an result with setting the url not existence set

    • SlashCommands

    In that location was an issue with creating commands that don't already be

    Changed

    • SelectInteraction

    .values is not .selected_values

    Added

    • Interaction

    Buttons and SelectMenus have a .bulletin property for the message where their interaction was creted ResponseMessages have a .interaction holding for the received interaction

    • Events

    Nosotros added a interaction_received issue for all interactions that are received

  • 3.i.0

    Added

    • discordpy ii support

    We added back up for discord.py v2, then you tin stay loyal to our libary and use it together with discord.py v2!

    • Exceptions

    Added own Exceptions for errors

    • ParseMethod

    You can alter the mode the extension parses interaction data. You lot tin can cull between unlike Methods

    • Auto-defer

    The libary will autodefer all interactions public. If you want to change that, take a look at the documentation for this characteristic

    • slashcommand edit check

    Slash commands will merely exist edited if in that location were some changes, so y'all won't get a invalid interaction error in discord after starting the bot If only permissions were changed, just the permissions will be edited and not the whole control like before

    Fixed

    • slash commands

    I finally stock-still the damn slashcommand organisation, it should piece of work now

    • Parsing

    The resolving, fetching and pulling from the cache methods should all work

  • 3.0.1

    Stock-still

    • small projection issues
  • 3.0.0

    Added

    • context commands

    Context commands are at present bachelor

    Changed

    • Project proper noun

    The project's name was inverse from discord-message-components to discord-ui

    • Extension is now UI
  • ii.one.0

    Added

    • Webhook back up

    You are now able to use webhooks together with message components, to ship a webhook bulletin with the components, utilize the Components.send_webhook role. The standart webhook office is also overriden with the new component function

    • Bladder type

    You can now apply float as the argument type for a slash command selection

    • Auto empty names

    Buttons, LinkButtons and SelectOptions labels are now past default \u200b, which is an "empty" char

    Changed

    • Lawmaking documentation to more than be more than informative

    Stock-still

    • Fixed small code bug (they were already fixed in previous versions, just I simply wanna list this here)

    • Docs are now working

  • 2.0.2

    Fixed

    • SelectOption

    Select option threw an exception if information technology was smaller than 1 or higher than 100

  • ii.0.0

    Added

    • Slashcomamnd back up

      • Slash grade for slash commands
      • Slash.control, Slash.subcommand and Slash.subcommand_groups are available for creating slash commands
      • SlashedCommand and SlashedSubCommand are there for used slash commands
    • Message

      • disable_action_row(row_numbers: int | range, disable: bool)

      disables (enables) component row(s) in the message

      • disable_components(disable: bool)

      disables (enables) all componentss

    • overrides

      • Messageable.send returns Message instead of discord.Bulletin and takes components parameter
      • override_client function added
    • interaction.send, creates followup messages which can be hidden

    • Component.listening_component

    A listening component with a callback office that will always be executed whenever a component with the specified custom_id was used

    Changed

    • Bulletin

      • All Message objects don't utilize the customer object anymore
      • Message.wait_for now needs the client every bit the first parameter

    Fixed

    • Interaction

    All interaction responses work now

    • A lot of issues I fogor💀
  • 1.2.2

    Fixed

    • Docs stock-still
  • 1.ii.1

    Stock-still

    • Small code fixes
  • 1.2.0

    Added

    • Complete message component suppport
    • Select menus
    • documentation
  • i.1.2

    Stock-still

    • Small code fixes
  • 1.1.1

    Added

    • Bulletin.edit()

      You lot can at present edit messages with button support

  • 1.1.0

    Changed

    • Major changes to request code, now using the client'south request
    • ResponseMessage.acknowledge() -> ResponseMessage.defer()

      Changed the name of the function + changed ResponseMessage.acknowledged -> ResponseMessage.deferred

    • ResponseMessage.defer() => await ResponseMessage.defer()

      defer (acknowledge) is now async and needs to be awaited

    Added

    • hidden responses

      You lot can now ship responses simply visible to the user

    Stock-still

    • ResponseMessage.respond()

      Now doesn't show a failed interaction

  • i.0.5

    Stock-still

    • ResponseMessage.respond()

      responding now doesn't fail after sending the bulletin, it will now defer the interaction by it self if not already deferred and and so ship the message

  • 1.0.4

    Added

    • ResponseMessage.acknowledged

      Whether the bulletin was acknowledged with the ResponseMessage.acknowledged() part

    Changed

    • ResponseMessage.respond() => expect ResponseMessage.respond()

      respond() function is now async and needs to exist awaited

    • ResponseMessage.respond() -> None => ResponseMessage.respond() -> Message or None

      respond() at present returns the sent message or None if ninja_mode is truthful

  • one.0.3

    Added

    • Push button.hash

      Buttons have now a custom hash holding, generated by the discord api

How To Register Your Name On Discord,

Source: https://pypi.org/project/discord-ui/

Posted by: perkinstairse.blogspot.com

0 Response to "How To Register Your Name On Discord"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel