#why can't the bot send the file?
1 messages · Page 1 of 1 (latest)
send code
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.
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.