mirror of
https://github.com/JonnyBro/JaBa.git
synced 2025-01-01 16:23:02 +05:00
17 lines
522 B
JavaScript
17 lines
522 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() {
|
|
this.login(config.token).then(async () => await Promise.all([initCommands(), initEvents()]).catch(console.error));
|
|
}
|
|
}
|