-
Code: >>> channel: TextChannel
>>> command: SlashCommand
>>> result: Interaction = await command()
>>> result.message
None # But when the command was called, an ephemeral message was sent
>>> await channel.fetch_message(result.id)
...
File ".../discord/http.py", line 840, in get_message
raise NotFound(_FakeResponse('Not Found', 404), 'message not found') # type: ignore # _FakeResponse is not a real Response
discord.errors.NotFound: 404 Not Found (error code: 0): message not found |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
If you want to get a response semi-reliably, use |
Beta Was this translation helpful? Give feedback.
-
@dolfies Still waiting on an update for this working and being able to read message.content for ephemeral messages. |
Beta Was this translation helpful? Give feedback.
Interaction.message
just searches through the local message cache, it isn't guaranteed to find anything.Interaction.id
isn't a message ID so no message with its ID exists.If you want to get a response semi-reliably, use
Client.wait_for
(with a reasonable timeout) or move the code that handles the message to anon_message
handler.