Issue
I have a disnake bot that sends an embed. I want to edit that embed a few days later, so I need to store the channel id and message id in order to update the embed later on. Until today I had a working solution:
await inter.send(embed=my_embed)
msg = await inter.original_message()
message_id = msg.id
However, without being aware of any changes from my side, I am now getting a 401.
File "/usr/local/lib/python3.8/site-packages/disnake/ui/view.py", line 370, in _scheduled_task
await item.callback(interaction)
File "/code/cogs/raffle_elements/time_selection.py", line 108, in callback
msg = await inter.original_message()
File "/usr/local/lib/python3.8/site-packages/disnake/interactions/base.py", line 342, in original_message
data = await adapter.get_original_interaction_response(
File "/usr/local/lib/python3.8/site-packages/disnake/webhook/async_.py", line 224, in request
raise HTTPException(response, data)
disnake.errors.HTTPException: 401 Unauthorized (error code: 50027): Invalid Webhook Token
Was there a change on discord's side? Is there a better and more robust way of getting the id of a message?
Solution
This is a problem on the discord side related to 19 digits in the new ids. They will fix it
Stuff that don't work temporarily:
- Modifying a webhook
- Interaction Defer
- Modifying interaction response
- Deleting webhooks
- Followup interactions
Developers discord server: https://discord.gg/discord-developers
Almost the same question: discord.py (error code: 50027): Invalid Webhook Token
Answered By - Ferlern
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.