Change onMessage to onMessageCreate

This commit is contained in:
Ethan Lane 2022-04-15 13:49:24 +01:00
parent 39c06fbc8e
commit 7a18df1119
Signed by: Vylpes
GPG key ID: EED233CC06D12504
5 changed files with 6 additions and 6 deletions

View file

@ -49,8 +49,8 @@ export class CoreClient extends Client {
return; return;
}); });
super.on("message", (message) => { super.on("messageCreate", (message) => {
this._events.onMessage(message, this._commandItems) this._events.onMessageCreate(message, this._commandItems)
}); });
super.on("ready", this._events.onReady); super.on("ready", this._events.onReady);

View file

@ -12,7 +12,7 @@ export class Events {
// Emit when a message is sent // Emit when a message is sent
// Used to check for commands // Used to check for commands
public async onMessage(message: Message, commands: ICommandItem[]) { public async onMessageCreate(message: Message, commands: ICommandItem[]) {
if (!message.guild) return; if (!message.guild) return;
if (message.author.bot) return; if (message.author.bot) return;

View file

@ -90,7 +90,7 @@ export class Util {
client.on('guildMemberAdd', e.Event.guildMemberAdd); client.on('guildMemberAdd', e.Event.guildMemberAdd);
client.on('guildMemberRemove', e.Event.guildMemberRemove); client.on('guildMemberRemove', e.Event.guildMemberRemove);
client.on('guildMemberUpdate', e.Event.guildMemberUpdate); client.on('guildMemberUpdate', e.Event.guildMemberUpdate);
client.on('message', e.Event.message); client.on('messageCreate', e.Event.messageCreate);
client.on('messageDelete', e.Event.messageDelete); client.on('messageDelete', e.Event.messageDelete);
client.on('messageUpdate', e.Event.messageUpdate); client.on('messageUpdate', e.Event.messageUpdate);
client.on('ready', e.Event.ready); client.on('ready', e.Event.ready);

View file

@ -71,7 +71,7 @@ export default class MessageEvents extends Event {
}; };
} }
public override async message(message: Message) { public override async messageCreate(message: Message) {
if (!message.guild) return; if (!message.guild) return;
if (message.author.bot) return; if (message.author.bot) return;

View file

@ -37,7 +37,7 @@ export class Event {
} }
public message(message: Message) { public messageCreate(message: Message) {
} }