only send auto embed if message was valid
This commit is contained in:
parent
ae9a1f93c4
commit
7f653930f0
|
@ -71,7 +71,7 @@ export class Bot {
|
|||
}
|
||||
});
|
||||
|
||||
client.on(Events.MessageCreate, async (msg) => {
|
||||
client.on(Events.MessageCreate, (msg) => {
|
||||
if (
|
||||
this.channel
|
||||
&& msg.channel.id === this.channel
|
||||
|
@ -100,10 +100,10 @@ export class Bot {
|
|||
]
|
||||
);
|
||||
console.log('added word to library, set lastUser and increased counter')
|
||||
}
|
||||
|
||||
if (this.counter === this.autoEmbedMessages) {
|
||||
this.sendEmbed(msg);
|
||||
if (this.counter === this.autoEmbedMessages) {
|
||||
this.sendEmbed(msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue