-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.ts
More file actions
29 lines (26 loc) · 934 Bytes
/
index.ts
File metadata and controls
29 lines (26 loc) · 934 Bytes
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, GatewayIntentBits } from 'discord.js';
import { config } from './env.js';
import { commands, events, registerCommands, registerEvents } from './util/loaders.js';
// Create a new client instance
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildModeration,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildPresences,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.GuildExpressions,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.GuildMessageTyping,
],
presence: {
activities: [{ type: ActivityType.Custom, name: '/help for commands' }],
status: 'online',
},
});
// Register events and commands
await registerEvents(client, events);
await registerCommands(client, commands);
void client.login(config.discord.token);