12345678910111213141516171819202122232425 |
- import { Client, ClientUser } from "discord.js";
- import { XenforoClient } from "./xenforo";
- export const FORUMS_DOMAIN = "https://custommaid3d2.com";
- export class BotClient {
- public bot = new Client();
- public forum = new XenforoClient(`${FORUMS_DOMAIN}/api`, process.env.FORUM_API_KEY ?? "");
- get botUser(): ClientUser {
- if (!this.bot.user)
- throw new Error("No bot user detected!");
- return this.bot.user;
- }
- get usernameMention(): string {
- return `<@${this.botUser.id}>`;
- }
- get nameMention(): string {
- return `<@!${this.botUser.id}>`;
- }
- }
- export const client = new BotClient();
|