UNPKG

xopbot

Version:

XOPBOT Is A Multipurpose Bot With Over 200+ Commands That Make You Love The Bot!

26 lines (23 loc) 895 B
import { Client, Collection } from 'discord.js'; import { readdirSync } from "fs"; import { path } from "path"; import { connect } from "mongoose"; import { Command } from "../commands/command"; import { Event } from "../events/message"; import { Config } from "../config"; import ConfigJson from "../../config.json"; class ExtendedClient extends Client { public commands: Collection<string, Command> = new Collection(); public events: Collection<string, Event> = new Collection(); public config: Config = ConfigJson; public aliases: Collection<string, Command> = new Collection(); public async init() { this.login(this.config.X_Token); connect(this.config.X_MongodbURL, { useNewUrlParser: true, useUnifiedTopology: true, useFindAndModify: true, }) } } export default ExtendedClient;