From d55e8aa69cde4b768b1a9c53994ce34cfe3f226d Mon Sep 17 00:00:00 2001 From: Vicg853 Date: Wed, 12 Jan 2022 20:28:38 -0300 Subject: [PATCH] scretKey as option on createbot() --- src/bot.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bot.ts b/src/bot.ts index 9aeedc214..2b7c0aa53 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -112,7 +112,7 @@ export function createBot(options: CreateBotOptions): Bot { unrepliedInteractions: new Set(), fetchAllMembersProcessingRequests: new Map(), }, - rest: createRestManager({ token: options.token, debug: options.events.debug }), + rest: createRestManager({ token: options.token, debug: options.events.debug, secretKey: options.secretKey ?? undefined }), } as Bot; bot.helpers = createHelpers(bot, options.helpers ?? {}); @@ -399,6 +399,7 @@ export interface CreateBotOptions { token: string; botId: bigint; applicationId?: bigint; + secretKey?: string; events: Partial; intents: (keyof typeof GatewayIntents)[]; botGatewayData?: GetGatewayBot;