-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.ts
29 lines (26 loc) · 1.25 KB
/
main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { ActivityType, Client, IntentsBitField, Partials } from 'discord.js';
import path from 'path';
import WOK, { DefaultCommands } from 'wokcommands';
require('dotenv').config();
const startTime = performance.now();
const client = new Client({
intents: [IntentsBitField.Flags.Guilds, IntentsBitField.Flags.GuildMessages, IntentsBitField.Flags.DirectMessages, IntentsBitField.Flags.MessageContent],
partials: [Partials.Channel],
});
client.on('ready', () => {
new WOK({
client,
commandsDir: path.join(__dirname, 'commands'),
testServers: ['980813190780841984', '1040650205202227261', '1137122349066498208'],
botOwners: ['315531146953752578', '304961013202288651'],
mongoUri: process.env.MONGO_URI || '',
disabledDefaultCommands: [DefaultCommands.ChannelCommand, DefaultCommands.Prefix, DefaultCommands.RequiredPerrmissions, DefaultCommands.RequiredRoles, DefaultCommands.ToggleCommand],
events: {
dir: path.join(__dirname, 'events'),
},
featuresDir: path.join(__dirname, 'features'),
});
});
client.login(process.env.TOKEN);
const finalTime = ((performance.now() - startTime) / 1000).toFixed(2);
console.log(`🎉🎉🎉 Yo(ur) bot is now running! Time: ${finalTime}s`);