Change onMessage to onMessageCreate
This commit is contained in:
parent
39c06fbc8e
commit
7a18df1119
5 changed files with 6 additions and 6 deletions
|
@ -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);
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ export class Event {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public message(message: Message) {
|
public messageCreate(message: Message) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue