Merge branch 'fp-attempt-9001' of https://github.com/discordeno/discordeno into fp-attempt-9001

This commit is contained in:
Skillz4Killz
2021-10-29 00:11:31 +00:00
committed by GitHub

View File

@@ -123,7 +123,7 @@ type CacheOptions =
export function createBot<C extends CacheOptions = CacheOptions>(
options: CreateBotOptions<C>
): Bot<C extends { isAsync: true } ? AsyncCache : Cache> {
return ({
return {
id: options.botId,
applicationId: options.applicationId || options.botId,
token: `Bot ${options.token}`,
@@ -136,7 +136,7 @@ export function createBot<C extends CacheOptions = CacheOptions>(
handlers: createBotGatewayHandlers({}),
// @ts-ignore b quiet
cache: createCache(options?.cache?.isAsync ?? false, options?.cache?.customTableCreator),
} as unknown) as Bot<C extends { isAsync: true } ? AsyncCache : Cache>;
} as unknown as Bot<C extends { isAsync: true } ? AsyncCache : Cache>;
}
export function createEventHandlers(events: Partial<EventHandlers>): EventHandlers {