#Bot Waiting For Response Not Working

1 messages · Page 1 of 1 (latest)

north fable
#

-d disnake.Client.wait_for

smoky crystalBOT
#

wait_for(event, *, check=None, timeout=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Waits for a WebSocket event to be dispatched.

This could be used to wait for a user to reply to a message, or to react to a message, or to edit a message in a self-contained way.

The `timeout` parameter is passed onto [`asyncio.wait_for()`](https://docs.python.org/3/library/asyncio-task.html#asyncio.wait_for "(in Python v3.11)"). By default, it does not timeout. Note that this does propagate the [`asyncio.TimeoutError`](https://docs.python.org/3/library/asyncio-exceptions.html#asyncio.TimeoutError "(in Python v3.11)") for you in case of timeout and is provided for ease of use.

In case the event returns multiple arguments, a [`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.11)") containing those arguments is returned instead. Please check the [documentation](https://docs.disnake.dev/page/api.html#discord-api-events) for a list of events and their parameters.

This function returns the **first event that meets the requirements**...
north fable
#

Please, read this part of docs

#

Where the await keyword and variable for disnake.Message object?

#

Oops, I didn't see this 'cause I using phone now

#

So, I want to see the full code

atomic lark
#

async def thirdbutton(self, ctx, inter: disnake.Interaction):
what?

#

Just use a modal. It's an infinitely cleaner solution