Execute on message edit
This commit is contained in:
parent
7613abd242
commit
999282bc9f
11
main.ts
11
main.ts
@ -103,6 +103,14 @@ function replyMessage(message, correctedMessage, abbrsUsed) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
client.on('messageCreate', message => {
|
client.on('messageCreate', message => {
|
||||||
|
checkMessage(message);
|
||||||
|
});
|
||||||
|
|
||||||
|
client.on('messageEdit', message => {
|
||||||
|
checkMessage(message);
|
||||||
|
});
|
||||||
|
|
||||||
|
function checkMessage(message) {
|
||||||
console.log(`${message.author.tag} in #${message.channel.name} sent: ${message.content}`);
|
console.log(`${message.author.tag} in #${message.channel.name} sent: ${message.content}`);
|
||||||
if (message.author.bot) {
|
if (message.author.bot) {
|
||||||
//console.log(message.author);
|
//console.log(message.author);
|
||||||
@ -155,5 +163,4 @@ client.on('messageCreate', message => {
|
|||||||
replyMessage(message, correctedMessage, abbrsUsed);
|
replyMessage(message, correctedMessage, abbrsUsed);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
|
Loading…
x
Reference in New Issue
Block a user