forked from boyonthebeach2k/simba
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
16 lines (12 loc) · 641 Bytes
/
main.js
File metadata and controls
16 lines (12 loc) · 641 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require('dotenv').config();
const client = new (require('discord.js')).Client({ intents: 32265, partials: ['CHANNEL', 'MESSAGE'] });//[Discord.Intents.FLAGS.GUILDS, Discord.Intents.FLAGS.GUILD_MESSAGES, Discord.Intents.FLAGS.DIRECT_MESSAGES] });
const { messageCreateHandler } = require('./commands/handlers');
const TOKEN = ((process.argv[2] || '').toLowerCase() === 'dev') ? process.env.DEV_TOKEN : process.env.BOT_TOKEN;
client.on('ready', () => {
console.info(`Logged in as ${client.user.tag}!`);
client.user.setActivity('!help', {
type: 'WATCHING',
});
});
client.on('messageCreate', messageCreateHandler);
client.login(TOKEN);