1 |
|
import 'reflect-metadata'; |
2 |
import { registerCommands, registerEvents } from './utils/registry'; |
import { registerCommands, registerEvents } from './utils/registry'; |
3 |
import DiscordClient from './client/Client'; |
import DiscordClient from './client/Client'; |
4 |
import { Intents } from 'discord.js'; |
import { Intents } from 'discord.js'; |
8 |
import { registrationEnd, registrationStart } from './utils/debug'; |
import { registrationEnd, registrationStart } from './utils/debug'; |
9 |
import { yellow } from './utils/util'; |
import { yellow } from './utils/util'; |
10 |
|
|
|
const client = new DiscordClient({ |
|
|
partials: ["CHANNEL"], |
|
|
intents: [ |
|
|
Intents.FLAGS.GUILDS, |
|
|
Intents.FLAGS.GUILD_MESSAGES, |
|
|
Intents.FLAGS.DIRECT_MESSAGES, |
|
|
Intents.FLAGS.DIRECT_MESSAGE_TYPING, |
|
|
Intents.FLAGS.GUILD_PRESENCES, |
|
|
Intents.FLAGS.GUILD_MEMBERS, |
|
|
Intents.FLAGS.GUILD_BANS, |
|
|
Intents.FLAGS.GUILD_MESSAGE_REACTIONS, |
|
|
Intents.FLAGS.GUILD_EMOJIS_AND_STICKERS, |
|
|
] |
|
|
}, path.resolve(__dirname, '..')); |
|
|
|
|
11 |
if (existsSync(path.join(__dirname, '../.env'))) { |
if (existsSync(path.join(__dirname, '../.env'))) { |
12 |
config(); |
config(); |
13 |
} |
} |
25 |
process.env.ENV = 'dev'; |
process.env.ENV = 'dev'; |
26 |
} |
} |
27 |
|
|
28 |
|
const client = new DiscordClient({ |
29 |
|
partials: ["CHANNEL"], |
30 |
|
intents: [ |
31 |
|
Intents.FLAGS.GUILDS, |
32 |
|
Intents.FLAGS.GUILD_MESSAGES, |
33 |
|
Intents.FLAGS.DIRECT_MESSAGES, |
34 |
|
Intents.FLAGS.DIRECT_MESSAGE_TYPING, |
35 |
|
Intents.FLAGS.GUILD_PRESENCES, |
36 |
|
Intents.FLAGS.GUILD_MEMBERS, |
37 |
|
Intents.FLAGS.GUILD_BANS, |
38 |
|
Intents.FLAGS.GUILD_MESSAGE_REACTIONS, |
39 |
|
Intents.FLAGS.GUILD_EMOJIS_AND_STICKERS, |
40 |
|
] |
41 |
|
}, path.resolve(__dirname, '..')); |
42 |
|
|
43 |
(async () => { |
(async () => { |
44 |
await registrationStart(); |
await registrationStart(); |
45 |
await registerCommands(client, '../commands'); |
await registerCommands(client, '../commands'); |
49 |
await registerEvents(client, '../events'); |
await registerEvents(client, '../events'); |
50 |
await registrationEnd(); |
await registrationEnd(); |
51 |
|
|
52 |
await client.login(process.env.token); |
await client.login(process.env.TOKEN); |
53 |
|
await console.log('test'); |
54 |
})(); |
})(); |