mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 00:40:07 +00:00
Merge branch 'fp-attempt-9001' of https://github.com/discordeno/discordeno into fp-attempt-9001
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user