mirror of
https://github.com/danbulant/Shasha
synced 2026-07-06 03:21:00 +00:00
betaaaaa
This commit is contained in:
parent
5c0d06ec57
commit
517799213c
1 changed files with 3 additions and 1 deletions
4
Main.js
4
Main.js
|
|
@ -60,7 +60,9 @@ client.on("message", async msg => {
|
||||||
lgr.message.letsChat(msg);
|
lgr.message.letsChat(msg);
|
||||||
|
|
||||||
if (msg.mentions.has(client.user) && !msg.isCommand) {
|
if (msg.mentions.has(client.user) && !msg.isCommand) {
|
||||||
const u = msg.cleanContent.replace(new RegExp("@" + (msg.guild ? msg.guild.member(client.user).displayName : msg.author.username)), "").trim();
|
const re = new RegExp("@" + (msg.guild ? msg.guild.member(client.user).displayName : msg.author.username));
|
||||||
|
const u = msg.cleanContent.replace(re, "").trim();
|
||||||
|
console.log(u, re);
|
||||||
if (u.length > 0) await trySend(client, msg, await chatAnswer(u));
|
if (u.length > 0) await trySend(client, msg, await chatAnswer(u));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue