#why can't the bot send the file?

1 messages · Page 1 of 1 (latest)

unique lynx
#

send code

analog orchid
#

you need to defer

#

then respond

upbeat riverBOT
#

await defer(*, with_message=..., ephemeral=...)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Defers the interaction response.

This is typically used when the interaction is acknowledged and a secondary action will be done later.

Changed in version 2.5: Raises [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.11)") when an interaction cannot be deferred.
floral pebble
#

You need to do a lot more than defer...

#

like, not create_table every single time the command is ran
and not add user only to then get the user again.

And then running blocking code, then saving an image to the filesystem, only to reopen/read it back. No wonder it's taking more than 3 seconds.

atomic lintel
#

💀

#

Please, forget time.sleep on async programming