Robbe
Robbe
DIAdiscord.js - Imagine an app
Created by Robbe on 8/10/2023 in #djs-questions
channel.send() sending duplicates
But anyways thanks alot for your input, I took the easy way out and edited the code to only fetch 1 item (the newest) and will now only check 1 item every 5min. That way I hope the api wont do any weird tricks while publishing new posts
8 replies
DIAdiscord.js - Imagine an app
Created by Robbe on 8/10/2023 in #djs-questions
channel.send() sending duplicates
I dont believe so, I only see one output in console. And the code runs every 5 minutes, and takes max 5 seconds to run.
8 replies
DIAdiscord.js - Imagine an app
Created by Robbe on 8/10/2023 in #djs-questions
channel.send() sending duplicates
I am now pretty sure that the dupe happens in the api that I am fetching. If I remove the postid from the .json and wait for it to post again, I cant get it to post duplicates. It only posts duplicates when the post is brand new at the url that I am fetching
8 replies
DIAdiscord.js - Imagine an app
Created by Robbe on 8/10/2023 in #djs-questions
channel.send() sending duplicates
It is from same code, thats my bad. I edited it to hide some private stuff and messed up.
8 replies
DIAdiscord.js - Imagine an app
Created by Robbe on 8/10/2023 in #djs-questions
channel.send() sending duplicates
8 replies
DIAdiscord.js - Imagine an app
Created by Hazelwize on 7/14/2023 in #djs-questions
Bot works on windows, but not on ubuntu.
Try to console.log(interaction) at the start of the user.js execute, also add try...catch with console.log(err) in that file. If you are deferring the reply right at interactionCreate.js start, then it either takes over 3 seconds to even reach your host or there is a problem with routing the interaction from interactionCreate.js to the correct command.
30 replies
DIAdiscord.js - Imagine an app
Created by Hazelwize on 7/14/2023 in #djs-questions
Bot works on windows, but not on ubuntu.
If you simply place try { interaction.deferReply(); } catch(err) { Console.log(err) } At the start of execute function at interactionCreate.js what error do you get? @hazelwize
30 replies
DIAdiscord.js - Imagine an app
Created by Hazelwize on 7/14/2023 in #djs-questions
Bot works on windows, but not on ubuntu.
if (interaction.commandName === 'ping') { await interaction.deferReply(); // Defer the reply to ensure the command is acknowledged const replyTimestamp = interaction.createdTimestamp; const currentTimestamp = Date.now(); const latency = currentTimestamp - replyTimestamp; await interaction.followUp(Pong! Latency: ${latency}ms); }
30 replies
DIAdiscord.js - Imagine an app
Created by Hazelwize on 7/14/2023 in #djs-questions
Bot works on windows, but not on ubuntu.
Probably just hitting the 3 second timeout timer, make sure you use deferReply as early as possible
30 replies