28 lines
854 B
JavaScript
28 lines
854 B
JavaScript
import dotenv from 'dotenv';
|
|
import { Client, GatewayIntentBits } from 'discord.js';
|
|
import readyEvent from './events/ready.js';
|
|
import interactionCreateEvent from './events/interactionCreate.js';
|
|
import messageCreateEvent from './events/messageCreate.js';
|
|
import messageReactionAddEvent from './events/messageReactionAdd.js';
|
|
|
|
dotenv.config();
|
|
|
|
const TOKEN = process.env.TOKEN;
|
|
|
|
const client = new Client({
|
|
intents: [
|
|
GatewayIntentBits.Guilds,
|
|
GatewayIntentBits.GuildMessages,
|
|
GatewayIntentBits.MessageContent,
|
|
GatewayIntentBits.GuildMessageReactions,
|
|
GatewayIntentBits.GuildMembers,
|
|
],
|
|
});
|
|
|
|
// 이벤트 등록
|
|
client.once('ready', readyEvent);
|
|
client.on('interactionCreate', interactionCreateEvent);
|
|
client.on('messageCreate', messageCreateEvent);
|
|
client.on('messageReactionAdd', messageReactionAddEvent);
|
|
|
|
client.login(TOKEN); |