MCPcopy Create free account
hub / github.com/esmBot/esmBot / send

Function send

src/utils/handler.ts:249–262  ·  view source on GitHub ↗
(bot: Client)

Source from the content-addressed store, hash-verified

247}
248
249export async function send(bot: Client) {
250 const commandArray = update();
251 log("info", "Sending application command data to Discord...");
252 let cmdArray = commandArray.main;
253 if (process.env.ADMIN_SERVER && process.env.ADMIN_SERVER !== "") {
254 await bot.application.bulkEditGuildCommands(
255 process.env.ADMIN_SERVER,
256 commandArray.private as CreateGuildApplicationCommandOptions[],
257 );
258 } else {
259 cmdArray = [...commandArray.main, ...commandArray.private];
260 }
261 await bot.application.bulkEditGlobalCommands(cmdArray);
262}

Callers 2

runMethod · 0.85
ready.tsFile · 0.85

Calls 2

logFunction · 0.90
updateFunction · 0.85

Tested by

no test coverage detected