mirror of
https://github.com/ahmadk953/poixpixel-discord-bot.git
synced 2025-03-29 15:54:15 +00:00
29 lines
696 B
TypeScript
29 lines
696 B
TypeScript
import { GatewayIntentBits } from 'discord.js';
|
|
import { ExtendedClient } from './structures/ExtendedClient.js';
|
|
import { loadConfig } from './util/configLoader.js';
|
|
|
|
async function startBot() {
|
|
try {
|
|
const config = loadConfig();
|
|
|
|
const client = new ExtendedClient(
|
|
{
|
|
intents: [
|
|
GatewayIntentBits.Guilds,
|
|
GatewayIntentBits.GuildMembers,
|
|
GatewayIntentBits.GuildMessages,
|
|
GatewayIntentBits.MessageContent,
|
|
GatewayIntentBits.GuildModeration,
|
|
],
|
|
},
|
|
config,
|
|
);
|
|
|
|
await client.initialize();
|
|
} catch (error) {
|
|
console.error('Failed to start bot:', error);
|
|
process.exit(1);
|
|
}
|
|
}
|
|
|
|
startBot();
|