kibubek
kibubek
DIAdiscord.js - Imagine an app
Created by kibubek on 9/16/2023 in #djs-questions
Security actions implemented, yet?
No description
5 replies
DIAdiscord.js - Imagine an app
Created by kibubek on 4/11/2023 in #djs-questions
Resending image in embed doesn't work on production, but works on dev
Hello, I have an function, that will resend any picture from a channel to another but in embed Workflow is Channel A gets a message with picture -> picture gets broken down to a base64 stream -> saved to a sequelize database as a Sequelize.TEXT data type-> Loaded using fs to create the image into local directory -> Loaded using attachmentBuilder and then used in setImage() -> Then Bot sends that embed into a channel B This all works on my computer when testing, but when deployed on production env, the images are broken and not working as it seems as seen in picture
10 replies
DIAdiscord.js - Imagine an app
Created by kibubek on 2/12/2023 in #djs-questions
Automatically revive archived threads
Hello, I'm trying to do a simple thing. When a forum post gets archived, then automatically unarchive it.
client.on("threadUpdate", async (thread, oldThread) => {
if (thread.archived && !oldThread.archived) {
await thread.setArchived(false);
}
});
client.on("threadUpdate", async (thread, oldThread) => {
if (thread.archived && !oldThread.archived) {
await thread.setArchived(false);
}
});
However, when testing i'm right clicking the post and then doing the "Close post" action, which doesn't get picked up by the bot. Is threadUpdate the right event to use?
3 replies