Restoring capability to use messageCreate event.

This commit is contained in:
Christer Warén
2021-09-02 12:07:08 +03:00
parent 5e53a908e7
commit f786abebe4
2 changed files with 45 additions and 0 deletions

View File

@ -11,6 +11,7 @@ const GatewayIntents = new Discord.Intents();
GatewayIntents.add(
1 << 0, // GUILDS
1 << 7, // GUILD_VOICE_STATES
1 << 9 // GUILD_MESSAGES
);
class RadioClient extends Client {
@ -46,12 +47,19 @@ class RadioClient extends Client {
require(`${events}ready`).execute(this);
this.datastore = new Datastore();
});
this.on("messageCreate", msg => {
require(`${events}messageCreate`).execute(this, msg);
});
this.on("interactionCreate", interaction => {
require(`${events}interactionCreate`).execute(this, interaction);
});
this.on("voiceStateUpdate", (oldState, newState) => {
require(`${events}voiceStateUpdate`).execute(this, oldState, newState);
});
this.on("error", error => {
console.error(error);
});