Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

inconsistency with message editing after interaction token expires #627

Open
3 tasks done
onerandomusername opened this issue Jul 16, 2022 · 1 comment
Open
3 tasks done
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@onerandomusername
Copy link
Member

Summary

messages sent with Inter.followup.send cannot be edited after 15 minutes

Reproduction Steps

see code below

Minimal Reproducible Code

await inter.send('h')
m = await inter.followup.send('h')
await asyncio.sleep(60 * 15)
await m.edit(content='j')

Expected Results

Message could be edited, or at least was not a token expired error.

Actual Results

The message could not be edited.

Intents

not relevant

System Information

disnake version: 2.6.0a4267+g1c9ddd8c

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

Additional Context

Related to #626

There is already handling in InteractionMessage which handles these cases, except that InteractionMessage uses different underlying methods than Webhooks use.

To solve this, we can explore several different solutions. For starters, we can consider a new InteractionWebhook class (which we could make use HTTPClient instead of the current Webhook implementation. This would also enable missing proxy support). The next part would be a possible InteractionWebhookMessage class which would a custom edit and delete implementation to include webhook token expiry and fallback to the bot token if they have expired.

One other possible solution would be implementing this support onto the existing Webhook and WebhookMessage class, in order to support editing followups even after the token expires.

@shiftinv @Chromosomologist

@onerandomusername onerandomusername added the bug Something isn't working label Jul 16, 2022
@onerandomusername onerandomusername moved this to Todo in disnake Jul 16, 2022
@onerandomusername onerandomusername added the help wanted Extra attention is needed label Jul 17, 2022
@shiftinv
Copy link
Member

related issue: #261

@onerandomusername onerandomusername added this to the disnake v2.6 milestone Aug 28, 2022
@shiftinv shiftinv modified the milestones: disnake v2.6, disnake v2.7 Sep 1, 2022
@shiftinv shiftinv modified the milestones: disnake v2.8, disnake v2.9 Feb 5, 2023
@shiftinv shiftinv removed this from the disnake v2.9 milestone Jun 16, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
Status: Todo
Development

No branches or pull requests

2 participants