2023-04-20 13:37:10 +00:00
|
|
|
import { Client, GatewayIntentBits } from 'discord.js';
|
2023-04-20 14:09:22 +00:00
|
|
|
import { config } from 'dotenv';
|
2023-04-20 13:37:10 +00:00
|
|
|
import guildMemberAdd from './behaviors/guildMemberAdd.js';
|
|
|
|
|
import interactionCreate from './behaviors/interactionCreate.js';
|
|
|
|
|
import ready from './behaviors/ready.js';
|
2023-04-20 14:09:22 +00:00
|
|
|
import tokenRequirements from './utilities/tokenRequirements.js';
|
|
|
|
|
|
|
|
|
|
config();
|
|
|
|
|
tokenRequirements();
|
2023-04-18 01:16:43 +00:00
|
|
|
|
2023-04-18 22:53:48 +00:00
|
|
|
const client = new Client({
|
|
|
|
|
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers],
|
|
|
|
|
});
|
2023-04-18 01:16:43 +00:00
|
|
|
|
2023-04-18 22:53:48 +00:00
|
|
|
client.on('error', console.error);
|
2023-04-20 13:37:10 +00:00
|
|
|
client.on('ready', ready);
|
|
|
|
|
client.on('guildMemberAdd', guildMemberAdd);
|
|
|
|
|
client.on('interactionCreate', interactionCreate);
|
2023-04-20 14:09:22 +00:00
|
|
|
client.login(process.env.DISCORD_TOKEN);
|