Kyusaor
Kyusaor
DIAdiscord.js - Imagine an app
Created by Kyusaor on 9/5/2024 in #djs-questions
Add thumbnail embed from locally running api
As the title says, is there a way to add an image as embed thumbnail without having to deploy the api online? I'm new to writing rest api, and was wondering if it's possible to do this
10 replies
DIAdiscord.js - Imagine an app
Created by Kyusaor on 8/3/2024 in #djs-questions
Discord seems to have troubles editing an interaction, but still doing it
I have troubles handling interactions reply with the single function below: i have a board with buttons, and when using one the bot should reply with another board of the same type. Then, I have to click another button before having a final confirmation message, but at this point the reply content is edited alone, the button stay in the loading position before being edited and I have the interaction failed error, event though the reply was sent and I didn't receive any error (video linked)
if (intera.replied)
await intera.editReply(data).catch(async e => {
console.error(e);
await intera.deleteReply().catch(e => e);
return await intera.followUp(data);
})

else if (intera.deferred)
return await intera.editReply(data);

else
return await intera.reply(data);
if (intera.replied)
await intera.editReply(data).catch(async e => {
console.error(e);
await intera.deleteReply().catch(e => e);
return await intera.followUp(data);
})

else if (intera.deferred)
return await intera.editReply(data);

else
return await intera.reply(data);
The problem happens on editReply, I don't understand why as I am using it the right way (or do I?) IMO editReply should be usable several times, I you may edit multiple times a reply It's only visual as absolutely no error is triggered, but still really annoying as the user would think that something went wrong.
42 replies