whoneedsroads
DIAdiscord.js - Imagine an app
•Created by whoneedsroads on 5/2/2024 in #djs-questions
Best way to get active client from http request
that worked, thanks Duck!
6 replies
DIAdiscord.js - Imagine an app
•Created by whoneedsroads on 5/2/2024 in #djs-questions
Best way to get active client from http request
omg i didn't even know discordjs rest was a thing
6 replies
DIAdiscord.js - Imagine an app
•Created by whoneedsroads on 5/2/2024 in #djs-questions
Best way to get active client from http request
this is what I'm doing each time
const client = await BotSetup.Once();
const guild = //Gets guild by GuildID;
const baseOnDuty = new BaseOnDuty(client, guild);
await Promise.all([
baseOnDuty.UpdateTransitOnDuty(transit), baseOnDuty.UpdateMedicOnDuty(medics),
]) client.destroy() await client.login(config.DISCORD_TOKEN); return client;
baseOnDuty.UpdateTransitOnDuty(transit), baseOnDuty.UpdateMedicOnDuty(medics),
]) client.destroy() await client.login(config.DISCORD_TOKEN); return client;
6 replies