̶v̶o̶i̶d̶
̶v̶o̶i̶d̶
DIAdiscord.js - Imagine an app
Created by ̶v̶o̶i̶d̶ on 8/5/2023 in #djs-questions
@discordjs/rest requests behave differently when deployed to a serverless node environment vs. local
if i don't await the first request to defer my interaction reply, the editReply and everything run and things appear fine but obviously i think i should be able to await that first request
8 replies
DIAdiscord.js - Imagine an app
Created by ̶v̶o̶i̶d̶ on 8/5/2023 in #djs-questions
@discordjs/rest requests behave differently when deployed to a serverless node environment vs. local
hmm nothing is throwing 👀
8 replies
DIAdiscord.js - Imagine an app
Created by ̶v̶o̶i̶d̶ on 8/5/2023 in #djs-questions
@discordjs/rest requests behave differently when deployed to a serverless node environment vs. local
cool thanks for the tips!
8 replies
DIAdiscord.js - Imagine an app
Created by ̶v̶o̶i̶d̶ on 8/5/2023 in #djs-questions
@discordjs/rest requests behave differently when deployed to a serverless node environment vs. local
creating my api client:
const rest = new REST({ version: "10" }).setToken(
process.env.DISCORD_BOT_TOKEN!,
);
const api = new API(rest);
const rest = new REST({ version: "10" }).setToken(
process.env.DISCORD_BOT_TOKEN!,
);
const api = new API(rest);
8 replies
DIAdiscord.js - Imagine an app
Created by ̶v̶o̶i̶d̶ on 8/5/2023 in #djs-questions
@discordjs/rest requests behave differently when deployed to a serverless node environment vs. local
running @discordjs/[email protected] and @discordjs/[email protected]
8 replies
DIAdiscord.js - Imagine an app
Created by ̶v̶o̶i̶d̶ on 8/5/2023 in #djs-questions
@discordjs/rest requests behave differently when deployed to a serverless node environment vs. local
await api.interactions.defer(message.id, message.token, {
flags: 64,
});
const result = await command.run(message.id);
await api.interactions.editReply(
process.env.DISCORD_APP_ID!,
message.token,
{
content: result,
flags: 64,
},
);
await api.interactions.defer(message.id, message.token, {
flags: 64,
});
const result = await command.run(message.id);
await api.interactions.editReply(
process.env.DISCORD_APP_ID!,
message.token,
{
content: result,
flags: 64,
},
);
8 replies