mirror of
https://github.com/JonnyBro/JaBa.git
synced 2025-01-01 16:23:02 +05:00
19 lines
537 B
JavaScript
19 lines
537 B
JavaScript
import { Client } from "discord.js";
|
|
import { config } from "../config.js";
|
|
import { init as initCommands } from "../handlers/command-handler/index.js";
|
|
import { init as initEvents } from "../handlers/event-handler/index.js";
|
|
|
|
export class ExtendedClient extends Client {
|
|
/**
|
|
* @param {import("discord.js").ClientOptions} options
|
|
*/
|
|
constructor(options) {
|
|
super(options);
|
|
}
|
|
|
|
async init() {
|
|
return this.login(config.token)
|
|
.then(async () => await Promise.all([initCommands(), initEvents()]))
|
|
.catch(console.error);
|
|
}
|
|
}
|