From 22a611761be08f498e305a53e688a2f3d4a55e41 Mon Sep 17 00:00:00 2001 From: Fleny Date: Sat, 3 Aug 2024 06:40:09 +0200 Subject: [PATCH] Make token in rest and gateway for createBot optional (#3820) --- packages/bot/src/bot.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/bot/src/bot.ts b/packages/bot/src/bot.ts index 98bbffd71..c0ccccf99 100644 --- a/packages/bot/src/bot.ts +++ b/packages/bot/src/bot.ts @@ -70,8 +70,8 @@ export function createBot(options: CreateBotOptions): Bot { applicationId: id, transformers: createTransformers(options.transformers, { defaultDesiredPropertiesValue: options.defaultDesiredPropertiesValue ?? false }), handlers: createBotGatewayHandlers(options.handlers ?? {}), - rest: createRestManager(options.rest), - gateway: createGatewayManager(options.gateway), + rest: createRestManager(options.rest as CreateRestManagerOptions), + gateway: createGatewayManager(options.gateway as CreateGatewayManagerOptions), events: options.events ?? {}, logger: options.loggerFactory ? options.loggerFactory('BOT') : createLogger({ name: 'BOT' }), // Set up helpers below. @@ -116,9 +116,9 @@ export interface CreateBotOptions { /** The bot's intents that will be used to make a connection with discords gateway. */ intents?: GatewayIntents /** Any options you wish to provide to the rest manager. */ - rest?: CreateRestManagerOptions & Partial> + rest?: Omit & Partial> /** Any options you wish to provide to the gateway manager. */ - gateway?: CreateGatewayManagerOptions & Partial> + gateway?: Omit & Partial> /** The event handlers. */ events?: Partial /** The functions that should transform discord objects to discordeno shaped objects. */