22 lines
662 B
TypeScript
22 lines
662 B
TypeScript
import { Client, GatewayIntentBits } from "discord.js";
|
|
import EventHandler from "@bot/handlers/events";
|
|
import InteractionHandler from "@bot/handlers/interactions";
|
|
|
|
export default class DiscordBot extends Client {
|
|
constructor() {
|
|
super({ intents: [
|
|
GatewayIntentBits.Guilds,
|
|
GatewayIntentBits.GuildMembers,
|
|
GatewayIntentBits.MessageContent,
|
|
GatewayIntentBits.GuildWebhooks, // May not need?
|
|
] });
|
|
|
|
this.login(process.env.BOT_TOKEN);
|
|
}
|
|
|
|
public events = new EventHandler(this);
|
|
public interactions = new InteractionHandler(this);
|
|
}
|
|
|
|
export const client = new DiscordBot();
|