MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / main

Function main

web/scripts/discord/register-commands.ts:20–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18const rest = new REST().setToken(env.DISCORD_BOT_TOKEN)
19
20async function main() {
21 try {
22 logger.info('Started refreshing application (/) commands.')
23
24 await rest.put(Routes.applicationCommands(env.DISCORD_APPLICATION_ID), {
25 body: commands,
26 })
27
28 logger.info('Successfully reloaded application (/) commands.')
29 } catch (error) {
30 logger.error({ error }, 'Error registering Discord commands')
31 process.exit(1)
32 }
33}
34
35main()

Callers 1

Calls 1

putMethod · 0.80

Tested by

no test coverage detected