From 73aa2fd73b7084f800a4f41229767fd4ebf1fa36 Mon Sep 17 00:00:00 2001 From: zkldi Date: Sun, 5 Sep 2021 13:14:27 +0100 Subject: [PATCH] Assert that client.application is not null --- bot/src/slashCommands/register.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/src/slashCommands/register.ts b/bot/src/slashCommands/register.ts index 2d0956ef3..0036defc7 100644 --- a/bot/src/slashCommands/register.ts +++ b/bot/src/slashCommands/register.ts @@ -32,7 +32,7 @@ const rest = new REST({ export const registerSlashCommands = async (client: Client): Promise => { try { logger.info("Registering slash commands"); - await rest.put(Routes.applicationCommands(client.application.id), { + await rest.put(Routes.applicationCommands(client.application!.id), { body: slashCommands.map((command) => command.info) }); } catch (e) {