Skip to content

Commit 9506be9

Browse files
committed
Continue to let bot start while command API is down
1 parent 58c8737 commit 9506be9

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/events/ready.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,13 @@ export async function handle(): Promise<void> {
3838
}
3939
})
4040

41-
if (config.production)
42-
await client.application?.commands.set(cmds)
43-
else
44-
await client.guilds.cache.get("247122362942619649")?.commands.set(cmds)
45-
Logger.info(`Commands registered for ${config.production}`)
41+
try {
42+
if (config.production)
43+
await client.application?.commands.set(cmds)
44+
else
45+
await client.guilds.cache.get("247122362942619649")?.commands.set(cmds)
46+
Logger.info(`Commands registered for ${config.production}`)
47+
} catch (error) {
48+
Logger.error("Unnable to register commands")
49+
}
4650
}

0 commit comments

Comments
 (0)