Releases: discord-py-ui/discord-ui
Fix DMChannel.send() not creates Channel on discord.User
https://pypi.org/project/discord-ui/4.2.4/
Fixed
- DMChannel.send()
DMChannel.send()
creates the DMChannel on discord.User now too
Add DMChannel autocreation to DMChannel.send()
https://pypi.org/project/discord-ui/4.2.3/
Fixed
- DMChannel.send()
DMChannel.send()
creates the DMChannel now if not exists
sync_commands
https://pypi.org/project/discord-ui/4.2.2/
Changed
- sync_commands
the
delete_unused
keyword is now optional, if you don't pass a parameter,slash.delete_unused
will be used (from the__init__
function)
callback-options
https://pypi.org/project/discord-ui/4.2.0/
Added
- cog_remove sync
when you remove a cog the slash commands will now get deleted if you set
delete_unused
to True and setsync_on_cog
to True
- alternativ slash options
you don't have to specify options in one of the slash decorators anymore. Instead, you can set them in your callback function
Example
@ui.slash.command()
async def greet(ctx, user): # This will add an required option with the name "user" of type "user"
"""Greets a user
You can use multiline docstrings, because only the first line will be used for the description
"""
...
@ui.slash.command()
async def tag(ctx, target: discord.User = None): # This will add an optional option with the name "target" of type "user"
# Note: you could also use target: "user" = None or anything else you would use in SlashOption for the type
...
Changed
- docstring description
Slashcommands now will only use the first line of the docstring
Fixed
- sync_commands
if you would sync the commands after the first sync, it threw an error
fix
https://pypi.org/project/discord-ui/4.1.1/
Fixed
cannot import name 'InteractionResponseType' from 'discord.enums'
PYPI Test
No Changes only workflow test
python 3.6 <
https://pypi.org/project/discord-ui/4.1.0
Added
- support for python 3.6 and newer
Fixed
forgot to remove some print statements 💀
fix
https://pypi.org/project/discord-ui/4.0.4/
Fixed
- slashcommand
when a user was passed in an option, its guild was always None
- context commands
if no name passed, the context command wouldn't take the callback name as the name of the command