scretKey as option on createbot()

This commit is contained in:
Vicg853
2022-01-12 20:28:38 -03:00
parent 2d7ad8d5b1
commit d55e8aa69c
+2 -1
View File
@@ -112,7 +112,7 @@ export function createBot(options: CreateBotOptions): Bot {
unrepliedInteractions: new Set<bigint>(),
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<EventHandlers>;
intents: (keyof typeof GatewayIntents)[];
botGatewayData?: GetGatewayBot;