1- import Discord from 'discord.js' ;
1+ import { Client , GatewayIntentBits , Collection } from 'discord.js' ;
22import config from './data/config.js' ;
33
44import loadEvents from './handlers/events.js' ;
55import loadInteractions from './handlers/handler.js' ;
66import registerApplicationCommands from './handlers/application.js' ;
77import { loadCronJobs } from './handlers/cronjobs.js' ;
88
9- const client = new Discord . Client ( {
9+ declare module 'discord.js' {
10+ interface Client {
11+ interaction : Collection < string , object > ; // Passende Typen hier einsetzen
12+ }
13+ }
14+
15+ const client = new Client ( {
1016 intents : [
11- Discord . GatewayIntentBits . MessageContent ,
12- Discord . GatewayIntentBits . Guilds ,
13- Discord . GatewayIntentBits . GuildMessages ,
14- Discord . GatewayIntentBits . GuildMembers ,
15- Discord . GatewayIntentBits . GuildIntegrations ,
16- Discord . GatewayIntentBits . GuildPresences ,
17- Discord . GatewayIntentBits . GuildMessageTyping ,
18- Discord . GatewayIntentBits . DirectMessages ,
17+ GatewayIntentBits . MessageContent ,
18+ GatewayIntentBits . Guilds ,
19+ GatewayIntentBits . GuildMessages ,
20+ GatewayIntentBits . GuildMembers ,
21+ GatewayIntentBits . GuildIntegrations ,
22+ GatewayIntentBits . GuildPresences ,
23+ GatewayIntentBits . GuildMessageTyping ,
24+ GatewayIntentBits . DirectMessages ,
1925 ] ,
2026 allowedMentions : {
2127 repliedUser : false // This will allow the bot to ping the user who used the command
@@ -24,7 +30,7 @@ const client = new Discord.Client({
2430
2531await client . login ( config . bot . token ) ;
2632
27- client . interaction = new Discord . Collection ( ) ;
33+ client . interaction = new Collection ( ) ;
2834
2935await loadEvents ( client ) ;
3036await loadInteractions ( './dist/interactions' , client ) ;
0 commit comments