-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
35 lines (28 loc) · 1.24 KB
/
index.js
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
30
31
32
33
34
35
require('dotenv').config();
const { Client, GatewayIntentBits, Partials, Collection, ActivityType } = require('discord.js')
const { Guilds, GuildMembers, GuildMessages, GuildMessageReactions, MessageContent, GuildVoiceStates } = GatewayIntentBits
const { User, Message, GuildMember, ThreadMember } = Partials
const client = new Client({
intents: [ Guilds, GuildMembers, GuildMessages, GuildMessageReactions, MessageContent, GuildVoiceStates ],
partials: [ User, Message, GuildMember, ThreadMember ]
});
client.events = new Collection()
client.commands = new Collection()
client.subCommands = new Collection()
client.guildConfig = new Collection()
client.messageDelete = new Collection()
const { connect } = require('mongoose')
connect(process.env.Database, {})
const { loadEvents } = require('./Handlers/event');
loadEvents(client);
const { loadConfig } = require('./Functions/configLoader');
loadConfig(client);
const { loadDistube } = require('./Handlers/distube');
loadDistube(client);
client.login(process.env.Token).then(() => {
console.log(`Client logged in as ${client.user.username}`)
client.user.setPresence({
activities: [{ name: `${client.user.username}`, type: ActivityType.Listening }],
status: 'online',
});
})