HyperNeutrino
HyperNeutrino
DIAdiscord.js - Imagine an app
Created by HyperNeutrino on 10/1/2022 in #djs-questions
Fetching webhook breaks inconsistently
can't wait to run into some weird race condition 3 months later when someone else's command invocation fails between when the REST client discards its token and when i can set it back
24 replies
DIAdiscord.js - Imagine an app
Created by HyperNeutrino on 10/1/2022 in #djs-questions
Fetching webhook breaks inconsistently
alright thanks ❤️ that's pretty scuffed though but it works so oh well
24 replies
DIAdiscord.js - Imagine an app
Created by HyperNeutrino on 10/1/2022 in #djs-questions
Fetching webhook breaks inconsistently
hm, yep adding a cmd.client.rest.setToken(...) in the catch block does fix this
24 replies
DIAdiscord.js - Imagine an app
Created by HyperNeutrino on 10/1/2022 in #djs-questions
Fetching webhook breaks inconsistently
so would a workaround be to just set the client's token again if this GET fails?
24 replies
DIAdiscord.js - Imagine an app
Created by HyperNeutrino on 10/1/2022 in #djs-questions
Fetching webhook breaks inconsistently
oh weird ok
24 replies
DIAdiscord.js - Imagine an app
Created by HyperNeutrino on 10/1/2022 in #djs-questions
Fetching webhook breaks inconsistently
lmao rip
24 replies
DIAdiscord.js - Imagine an app
Created by HyperNeutrino on 10/1/2022 in #djs-questions
Fetching webhook breaks inconsistently
i suppose i could just fetch it without the webhook token then, since the bot does request Manage Webhooks...
24 replies
DIAdiscord.js - Imagine an app
Created by HyperNeutrino on 10/1/2022 in #djs-questions
Fetching webhook breaks inconsistently
oh interesting
24 replies
DIAdiscord.js - Imagine an app
Created by HyperNeutrino on 10/1/2022 in #djs-questions
Fetching webhook breaks inconsistently
anyway yes, I do get a 401 from the invalid webhook fetch which then causes the subsequent GET to not even be called
24 replies
DIAdiscord.js - Imagine an app
Created by HyperNeutrino on 10/1/2022 in #djs-questions
Fetching webhook breaks inconsistently
since I do provide the webhook's token again in the next call
24 replies
DIAdiscord.js - Imagine an app
Created by HyperNeutrino on 10/1/2022 in #djs-questions
Fetching webhook breaks inconsistently
wait, like it unsets the client's token or something?
24 replies
DIAdiscord.js - Imagine an app
Created by HyperNeutrino on 10/1/2022 in #djs-questions
Fetching webhook breaks inconsistently
oh like through client.on? not sure how to do that either sorry
24 replies
DIAdiscord.js - Imagine an app
Created by HyperNeutrino on 10/1/2022 in #djs-questions
Fetching webhook breaks inconsistently
the issue happens only after i fetch an invalid URL; i've been doing this previously as well and never had issues since i never tried entering an invalid URL
24 replies
DIAdiscord.js - Imagine an app
Created by HyperNeutrino on 10/1/2022 in #djs-questions
Fetching webhook breaks inconsistently
oh thanks lol
24 replies
DIAdiscord.js - Imagine an app
Created by HyperNeutrino on 10/1/2022 in #djs-questions
Fetching webhook breaks inconsistently
but i am not getting any output
24 replies
DIAdiscord.js - Imagine an app
Created by HyperNeutrino on 10/1/2022 in #djs-questions
Fetching webhook breaks inconsistently
(just inserted this right before my login line)
24 replies
DIAdiscord.js - Imagine an app
Created by HyperNeutrino on 10/1/2022 in #djs-questions
Fetching webhook breaks inconsistently
const rest = new REST({ version: "10" }).setToken(config.discord_token);

rest.on("response", (req, res) => {
console.log(req, res);
});
const rest = new REST({ version: "10" }).setToken(config.discord_token);

rest.on("response", (req, res) => {
console.log(req, res);
});
24 replies
DIAdiscord.js - Imagine an app
Created by HyperNeutrino on 10/1/2022 in #djs-questions
Fetching webhook breaks inconsistently
i've never used djs/rest before; currently just trying the following
24 replies