110 commandshelp about command errors which causes command to not run #126
5 changed files with 6 additions and 6 deletions
|
@ -49,8 +49,8 @@ export class CoreClient extends Client {
|
|||
return;
|
||||
});
|
||||
|
||||
super.on("message", (message) => {
|
||||
this._events.onMessage(message, this._commandItems)
|
||||
super.on("messageCreate", (message) => {
|
||||
this._events.onMessageCreate(message, this._commandItems)
|
||||
});
|
||||
super.on("ready", this._events.onReady);
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ export class Events {
|
|||
|
||||
// Emit when a message is sent
|
||||
// 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.author.bot) return;
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ export class Util {
|
|||
client.on('guildMemberAdd', e.Event.guildMemberAdd);
|
||||
client.on('guildMemberRemove', e.Event.guildMemberRemove);
|
||||
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('messageUpdate', e.Event.messageUpdate);
|
||||
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.author.bot) return;
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ export class Event {
|
|||
|
||||
}
|
||||
|
||||
public message(message: Message) {
|
||||
public messageCreate(message: Message) {
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue