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 (
|
if (
|
||||||
this.channel
|
this.channel
|
||||||
&& msg.channel.id === 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')
|
console.log('added word to library, set lastUser and increased counter')
|
||||||
}
|
|
||||||
|
|
||||||
if (this.counter === this.autoEmbedMessages) {
|
if (this.counter === this.autoEmbedMessages) {
|
||||||
this.sendEmbed(msg);
|
this.sendEmbed(msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue