diff --git a/packages/axios/src/index.ts b/packages/axios/src/index.ts index c4392e09..c377d41c 100644 --- a/packages/axios/src/index.ts +++ b/packages/axios/src/index.ts @@ -14,7 +14,7 @@ export interface Quester { } export class Quester { - constructor(config: Quester.Config) { + constructor(config: Quester.Config = {}) { const request = async (config: AxiosRequestConfig = {}) => { const options = http.prepare() const error = new Error() as Axios.AxiosError diff --git a/packages/core/src/bot.ts b/packages/core/src/bot.ts index aa7686f5..e4232ce0 100644 --- a/packages/core/src/bot.ts +++ b/packages/core/src/bot.ts @@ -37,7 +37,8 @@ export abstract class Bot implements Login ctx.bots.push(this) this.context.emit('bot-added', this) - ctx.on('ready', () => { + ctx.on('ready', async () => { + await Promise.resolve() this.dispatchLoginEvent('login-added') return this.start() })