forked from MotiCAT/TuneNekoSync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
28 lines (25 loc) · 1.02 KB
/
index.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
import { onInteractionCreate } from './Events/onInteractionCreate';
import { onMessageCreate } from './Events/onMessageCreate';
import { onReady } from './Events/onReady';
import { onVoiceStateUpdate } from './Events/onVoiceStateUpdate';
import { extendedClient as Client } from './Utils/extendedClient';
import { BaseInteraction, GatewayIntentBits, Message, VoiceState } from 'discord.js';
import { config } from 'dotenv';
config();
export const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildVoiceStates
],
allowedMentions: {
repliedUser: false
}
});
client
.once('ready', () => onReady(client))
.on('messageCreate', async (message: Message) => onMessageCreate(message))
.on('interactionCreate', async (interaction: BaseInteraction) => onInteractionCreate(interaction))
.on('voiceStateUpdate', async (oldState: VoiceState, newState: VoiceState) => onVoiceStateUpdate(oldState, newState))
.login(process.env.TOKEN);