Skip to content

Commit

Permalink
[Discord] Fetch and store Message for statistics command
Browse files Browse the repository at this point in the history
Fetch and store Message instead of InteractionMessage for statistics command when invoked as a slash command
  • Loading branch information
Harmon758 committed Jul 25, 2023
1 parent 6a6f7ec commit 7bbe890
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Discord/cogs/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ async def statistics(self, ctx):
embeds = view.general_embeds,
view = view
)
if ctx.interaction:
# Fetch Message, as InteractionMessage token expires after 15 min.
message = await message.fetch()
view.message = message
ctx.bot.views.append(view)

Expand Down

0 comments on commit 7bbe890

Please sign in to comment.