SEBAS
DIAdiscord.js - Imagine an app
•Created by SEBAS on 1/23/2025 in #djs-questions
Message Component Collector is not collecting after String Select Menu Interaction
Quick Update: I resolved the issue by passing the withResponse parameter to the replied message, and it works now! If anyone else is facing the same problem, here’s an example of the implementation:
I’m marking this as solved, but I still find it confusing that, without this workaround, the collector only worked with the Command Interaction and not the String Select Menu Interaction. If anyone could verify whether this is the intended behavior, it would be greatly appreciated!
4 replies
DIAdiscord.js - Imagine an app
•Created by SEBAS on 1/23/2025 in #djs-questions
Message Component Collector is not collecting after String Select Menu Interaction
Here are the files. As a note, the replyInteraction is a wrapper that in both cases execute the interaction.reply(message) function for the interaction passed as a parameter
4 replies
DIAdiscord.js - Imagine an app
•Created by SEBAS on 12/1/2023 in #djs-questions
Workaround Invalid Webhook Token Error
Thank you, just tested and it works!
14 replies
DIAdiscord.js - Imagine an app
•Created by SEBAS on 12/1/2023 in #djs-questions
Workaround Invalid Webhook Token Error
Do you recommend me to change it to update the last collected interaction?
14 replies
DIAdiscord.js - Imagine an app
•Created by SEBAS on 12/1/2023 in #djs-questions
Workaround Invalid Webhook Token Error
You're right, the error happens after I call an editReply, which I call after the collector ends
14 replies
DIAdiscord.js - Imagine an app
•Created by SEBAS on 12/1/2023 in #djs-questions
Workaround Invalid Webhook Token Error
Sorry, had to replicate it again because I had the error stack turned off
14 replies
DIAdiscord.js - Imagine an app
•Created by SEBAS on 12/1/2023 in #djs-questions
Workaround Invalid Webhook Token Error
I call the update on every buttonInteraction I collect
14 replies
DIAdiscord.js - Imagine an app
•Created by SEBAS on 12/1/2023 in #djs-questions
Workaround Invalid Webhook Token Error
This is the error message I received:
Invalid Webhook Token {
"requestBody": {
"files": [],
"json": {
"content": "Fall Ended",
"tts": false,
"embeds": [
{
"color": 39423,
"title": "Singles 2/3 Falls Match",
"fields": [
{
"name": "🟢 SEBAS ",
"value": "Health: 9%",
"inline": true
},
{
"name": "🔴 vamtibu",
"value": "Health: 0%",
"inline": true
},
{
"name": "Match Actions",
"value": "🤼 SEBAS launched an incredible dropkick to vamtibu, resulting in 19% damage.\n💀 vamtibu WAS ELIMINATED BY SEBAS\n🛎️ And the winner of this fall is...\nSEBAS!!! 🎉🎉\nThe scores are:\nSEBAS: 1 fall\nvamtibu: 0 falls"
}
]
}
],
"components": [
{
"type": 1,
"components": [
{
"type": 2,
"custom_id": "nextFall",
"label": "👍 Next Fall? 0/2",
"style": 1
},
{
"type": 2,
"custom_id": "leave",
"label": "🏃 Leave",
"style": 4
}
]
}
]
}
},
"rawError": {
"message": "Invalid Webhook Token",
"code": 50027
},
"code": 50027,
"status": 401,
"method": "PATCH",
"url": "https://discord.com/api/v10/webhooks/1164768291542269983/aW50ZXJhY3Rpb246MTE4MDE4NjY0NzEyODcxMTE4ODphVzU5dkZIYzBNSjJDaU5aWExIRTN2dzBWVmZJS2htMkUycEcwUlJQYXdkaFViQmJuVE5DanJ4Q0N4SlR2N3BERHZ1SzJTaHRua1VlRlNFRDdrSGlTTm5pMUNyaW16dUZiaXByelRvVmVRZlBYN294QjVDUEVuMFlhMVhZempjcA/messages/@original"
}
14 replies
DIAdiscord.js - Imagine an app
•Created by SEBAS on 12/1/2023 in #djs-questions
Workaround Invalid Webhook Token Error
I tested it using update instead of editReply, it seems that it still expires the token
14 replies
DIAdiscord.js - Imagine an app
•Created by SEBAS on 12/1/2023 in #djs-questions
Workaround Invalid Webhook Token Error
Thanks
14 replies
DIAdiscord.js - Imagine an app
•Created by SEBAS on 12/1/2023 in #djs-questions
Workaround Invalid Webhook Token Error
Ok, I'm going to try it
14 replies
DIAdiscord.js - Imagine an app
•Created by SEBAS on 12/1/2023 in #djs-questions
Workaround Invalid Webhook Token Error
When one of those interaction is collected, it triggers a event that, by using a queue system, defers the interaction and edit the original message
14 replies
DIAdiscord.js - Imagine an app
•Created by SEBAS on 12/1/2023 in #djs-questions
Workaround Invalid Webhook Token Error
They interact with button/select menu interaction, every valid interaction is collected
14 replies