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

Commit e190463

Browse files
committed
fixed by in wait_for
1 parent 591c5c9 commit e190463

File tree

5 files changed

+17
-2
lines changed

5 files changed

+17
-2
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,16 @@ You can find more (and better) examples [here](https://github.com/discord-py-ui/
176176

177177
# Changelog
178178

179+
- <details>
180+
<summary>4.3.0</summary>
181+
182+
## **Fixed**
183+
- `Message.wait_for`
184+
> by keyword doesn't work properly
185+
186+
187+
</details>
188+
179189
- <details>
180190
<summary>4.2.14</summary>
181191

discord_ui/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@
4444

4545

4646
__title__ = "discord-ui"
47-
__version__ = "4.2.14"
47+
__version__ = "4.3.0"

discord_ui/client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import inspect
2222
import asyncio
2323
import contextlib
24+
from functools import wraps
2425
from typing import Coroutine, Dict, List, Tuple, Union
2526
try:
2627
from typing import Literal
@@ -834,6 +835,9 @@ async def nuke_commands(self):
834835
logging.info("nuked all commands")
835836

836837

838+
839+
840+
837841
def add_command(self, name=MISSING, callback=None, description=MISSING, options=MISSING, guild_ids=MISSING, default_permission=True, guild_permissions=MISSING, api=False) -> Union[None, Coroutine]:
838842
"""
839843
Adds a new slashcommand

discord_ui/receive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ def _check(com):
598598
if not _none(custom_id):
599599
statements.append(com.custom_id == custom_id)
600600
if not _none(by):
601-
statements.append(com.member.id == (by.id if hasattr(by, "id") else int(by)))
601+
statements.append(com.author.id == (by.id if hasattr(by, "id") else int(by)))
602602
if not _none(check):
603603
statements.append(check(com))
604604
return all(statements)

discord_ui/tools.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def get(self, *args):
1717

1818
MISSING = _MISSING()
1919

20+
2021
def _none(*args, empty_array=False):
2122
return all(x in [None, MISSING] + [[], [[]]][empty_array is True] for x in args)
2223
def _or(*args, default=None):

0 commit comments

Comments
 (0)