dolfies / discord.py-self

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

Interaction.message #388

Closed slayernominee closed 1 year ago

slayernominee commented 1 year ago

Summary

I used a slash command and got an interaction but it doesnt include the message

Reproduction Steps

command = 'balance' async for cmd in channel.slash_commands(query=command): if cmd.name == command and cmd.application_id == dank_memer_id: interaction = await cmd() print(interaction.message)

Code

command = 'balance'
        async for cmd in channel.slash_commands(query=command):
            if cmd.name == command and cmd.application_id == dank_memer_id:
                interaction = await cmd()
                print(interaction.message)

Expected Results

return a discord.Message Type

Actual Results

return None

System Information

Checklist

Additional Information

No response

dolfies commented 1 year ago

interaction.message is a helper that attempts to get the message from cache. It isn't guaranteed to return anything.

njho commented 10 months ago

What's the workaround for this in order to retrieve that message?