Skip to content
This repository was archived by the owner on Mar 8, 2022. It is now read-only.

Commit faa69ef

Browse files
committed
uploaded v4.3
1 parent 69fed39 commit faa69ef

27 files changed

+1601
-799
lines changed

README.md

Lines changed: 64 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<p align="center">
33
<h2 align="center">discord-ui</h2>
44
<p align="center">
5-
A discord.py user-interface extension
5+
A discord.py extension for using discord ui/interaction features
66
<br />
77
<a href="https://pypi.org/project/discord-ui/"><b>pip package</b></a>
88
@@ -22,22 +22,22 @@
2222
This is a [discord.py](https://github.com/Rapptz/discord.py) ui extension made by [404kuso](https://github.com/404kuso) and [RedstoneZockt](https://github.com/RedstoneZockt)
2323
for using discord's newest ui features like buttons, slash commands and context commands (we got dpy2 supported if you want to keep using our libary)
2424

25+
[Documentation](https://discord-ui.readthedocs.io/en/latest/)
26+
2527
## Installation
2628

29+
30+
### Windows
31+
2732
```cmd
28-
# windows
2933
py -m pip install discord-ui
34+
```
3035

31-
# linux
36+
### Linux
37+
```bash
3238
python3 -m pip install discord-ui
3339
```
3440

35-
## Docs
36-
37-
You can read the docs [here](https://discord-ui.rtfd.io/)
38-
39-
> The docs can include some typos or issues, if so, plz let me know
40-
4141
## License
4242

4343
This project is under MIT License
@@ -139,7 +139,7 @@ async def on_message(message: discord.Message):
139139
], max_values=2)])
140140
try:
141141
sel = await msg.wait_for("select", client, by=message.author, timeout=20)
142-
await sel.respond("you selected `" + str([x.content for x in sel.selected_values]) + "`")
142+
await sel.respond("you selected `" + str([x.content for x in sel.selected_options]) + "`")
143143
except TimeoutError:
144144
await msg.delete()
145145

@@ -177,9 +177,60 @@ You can find more (and better) examples [here](https://github.com/discord-py-ui/
177177
# Changelog
178178

179179
- <details>
180-
<summary>4.2.15</summary>
180+
<summary>4.3.0</summary>
181181

182182
## **Fixed**
183+
- `Message.wait_for`
184+
> by keyword doesn't work properly
185+
186+
## **Removed**
187+
- Hash
188+
> Removed the hash property from Buttons and SelectMenus due to the removal of it from the api
189+
190+
## **Added**
191+
- `discord_ui.ext`
192+
> A module with usefull tools and decorators to use [more information](https://discord-ui.readthedocs.io/en/latest/ext.html)
193+
194+
- BaseCommand
195+
> BaseCommand (the superclass for all applicationcommands) has now some extra properties:
196+
197+
- is_chat_input
198+
> Whether this command is a slash command
199+
200+
- is_message_context
201+
> Whether this command is a message context command
202+
203+
- is_user_context
204+
> Whether this command is a user context command
205+
206+
- SlashedCommand
207+
> Added properties:
208+
209+
- is_alias
210+
> Whether the invoked command is an alias or not
211+
212+
- aliases
213+
> All the available aliases for the command
214+
215+
- Listeners
216+
> Listeners are something that you can use for a better processing of received components.
217+
> You could see them as a cog to the message components
218+
> [more information](https://discord-ui.readthedocs.io/en/latest/listeners.html)
219+
220+
## **Changed**
221+
- SelectedMenu
222+
> `SelectedMenu.selected_values` are not the raw values that were selected, `SelectMenu.selected_options` are the options of type `SlashOption` that were selected
223+
- MISSING => None
224+
> All instance values that were `MISSING` by default are now `None`
225+
226+
227+
228+
</details>
229+
230+
- <details>
231+
<summary>4.2.15</summary>
232+
233+
# Fixed
183234
- #97
184235

185236
</details>
@@ -230,7 +281,7 @@ You can find more (and better) examples [here](https://github.com/discord-py-ui/
230281

231282
- <details>
232283
<summary>4.2.8</summary>
233-
284+
234285
## **Added**
235286

236287
- edit_subcomand
@@ -251,19 +302,15 @@ You can find more (and better) examples [here](https://github.com/discord-py-ui/
251302
<summary>4.2.7</summary>
252303

253304
## **Added**
254-
255305
- `on_component`
256306
> There is now an event with the name `component` that will be dispatched whenever a component was received
257307
> If you use `Message.wait_for`, there is now a new event choice with the name `component` (`message.wait_for("component", client)`)
258308
259-
260309
## **Fixed**
261-
262310
- #94
263311
> DM issue with deleting messages
264312
265313
## **Changed**
266-
267314
- `edit`
268315
> Edit now takes "content" as not positional (`.edit("the content")` works now)
269316
- component lenght
@@ -949,5 +996,5 @@ You can find more (and better) examples [here](https://github.com/discord-py-ui/
949996
You can contact us on discord
950997

951998
- `RedstoneZockt#2510`
952-
- `! DaKuso#6969`
999+
- `! kuso#6969`
9531000
- [discord](https://discord.gg/bDJCGD994p)

discord_ui/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@
3838
from .tools import components_to_dict
3939
from .slash.tools import create_choice
4040
from .receive import Interaction, InteractionType, Message, WebhookMessage, PressedButton, SelectedMenu, ComponentContext, SlashedCommand, SlashedSubCommand, EphemeralMessage, EphemeralResponseMessage
41+
from .slash import ext
42+
from .listener import Listener
4143

4244
from .override import override_dpy, override_dpy2_client
4345
override_dpy2_client()
4446

4547

4648
__title__ = "discord-ui"
47-
__version__ = "4.2.15"
49+
__version__ = "4.3.0"

0 commit comments

Comments
 (0)