dolfies / discord.py-self

A fork of the popular discord.py for user accounts.
https://discordpy-self.rtfd.io/en/latest/
MIT License
684 stars 162 forks source link

timeout returns an error in bot.wait_for #260

Closed theAbdoSabbagh closed 2 years ago

theAbdoSabbagh commented 2 years ago

Summary

title

Reproduction Steps

Use bot.wait_for.

Code

response = await bot.wait_for('message', check = lambda m: m.author.id == 270904126974590976, timeout = 5)

Expected Results

it should just timeout

Actual Results

Ignoring exception in on_start_button_action
Traceback (most recent call last):
  File "C:\Users\aboud\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 456, in wait_for
    return fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\aboud\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 329, in _run_event
    await coro(*args, **kwargs)
  File "C:\Users\aboud\Desktop\My files\Modern GUI\Version 2\darkend.py", line 436, in rewritten_1
    response = await bot.wait_for('message', check = lambda m: m.author.id == 270904126974590976, timeout = 5)
  File "C:\Users\aboud\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 458, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError

System Information

doesnt work

Checklist

Additional Information

No response

TheOnlyWayUp commented 2 years ago

asyncio.exceptions.TimeoutError..

Your timeout caused it to timeout, and provide more information. Was the response variable populated at all? (As in, did it get the return value of wait for and still timeout?), etc. Don't just say title under the summary, you're supposed to put actual content there, remove the field altogether if you won't use it.

Also, I think discussions would be better suited for this, you can make an issue only if it's an actual bug

theAbdoSabbagh commented 2 years ago

ty