add interaction passoff

This commit is contained in:
Emily 2022-12-11 13:39:56 +11:00
parent c929e8b949
commit 3b8fdb61b8

View file

@ -15,43 +15,49 @@ class EventHandler {
case 'error': { case 'error': {
const errorModules = this.client.eventModules.filter(module => module.wsEvent === 'error'); const errorModules = this.client.eventModules.filter(module => module.wsEvent === 'error');
errorModules.forEach(module => module.run(this.client, error)); errorModules.forEach(module => module.run(this.client, param_1));
break; break;
} }
case 'messageCreate': { case 'messageCreate': {
const mCreateModules = this.client.eventModules.filter(module => module.wsEvent === 'messageCreate'); const mCreateModules = this.client.eventModules.filter(module => module.wsEvent === 'messageCreate');
mCreateModules.forEach(module => module.run(this.client, message)); mCreateModules.forEach(module => module.run(this.client, param_1));
break;
}
case 'interactionCreate': {
const iCreateModules = this.client.eventModules.filter(module => module.wsEvent === 'interactionCreate');
iCreateModules.forEach(module => module.run(this.client, param_1));
break; break;
} }
case 'guildCreate': { case 'guildCreate': {
const gCreateModules = this.client.eventModules.filter(module => module.wsEvent === 'guildCreate'); const gCreateModules = this.client.eventModules.filter(module => module.wsEvent === 'guildCreate');
gCreateModules.forEach(module => module.run(this.client, guild)); gCreateModules.forEach(module => module.run(this.client, param_1));
break; break;
} }
case 'guildDelete': { case 'guildDelete': {
const gDeleteModules = this.client.eventModules.filter(module => module.wsEvent === 'guildDelete'); const gDeleteModules = this.client.eventModules.filter(module => module.wsEvent === 'guildDelete');
gDeleteModules.forEach(module => module.run(this.client, guild)); gDeleteModules.forEach(module => module.run(this.client, param_1));
break; break;
} }
case 'guildMemberAdd': { case 'guildMemberAdd': {
const gMemberAddModules = this.client.eventModules.filter(module => module.wsEvent === 'guildMemberAdd'); const gMemberAddModules = this.client.eventModules.filter(module => module.wsEvent === 'guildMemberAdd');
gMemberAddModules.forEach(module => module.run(this.client, guild, member)); gMemberAddModules.forEach(module => module.run(this.client, param_1, param_2));
break; break;
} }
case 'guildMemberRemove': { case 'guildMemberRemove': {
const gMemberRemoveModules = this.client.eventModules.filter(module => module.wsEvent === 'guildMemberRemove'); const gMemberRemoveModules = this.client.eventModules.filter(module => module.wsEvent === 'guildMemberRemove');
gMemberRemoveModules.forEach(module => module.run(this.client, guild, member)); gMemberRemoveModules.forEach(module => module.run(this.client, param_1, param_2));
break; break;
} }
case 'voiceStateUpdate': { case 'voiceStateUpdate': {
const vStateUpdateModules = this.client.eventModules.filter(module => module.wsEvent === 'voiceStateUpdate'); const vStateUpdateModules = this.client.eventModules.filter(module => module.wsEvent === 'voiceStateUpdate');
vStateUpdateModules.forEach(module => module.run(this.client, oVoiceState, nVoiceState)); vStateUpdateModules.forEach(module => module.run(this.client, param_1, param_2));
break; break;
} }
} }