Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mrepol742 committed Mar 12, 2024
1 parent 0ba2a7d commit 3d81d03
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6769,7 +6769,15 @@ function isGoingToFast(api, event) {
let input = eventB.normalize("NFKC");
commandCalls++;
utils.logged("event_body " + event.threadID + " " + input);
if (!users.list.find((user) => event.senderID === user.id)) {

if (!users.list.find((user) => event.senderID === user.id && user["name"])) {
api.getUserInfo(event.senderID, async (err, data1) => {
if (err) return handleError({ stacktrace: err, cuid: api.getCurrentUserID(), e: event });
utils.logged("old_user " + event.threadID + " " + data1[event.senderID].name);
updateUserData(data1, event.senderID);
reactMessage(api, event, ":heart:");
});
} else if (!users.list.find((user) => event.senderID === user.id)) {
api.getUserInfo(event.senderID, async (err, data1) => {
if (err) return handleError({ stacktrace: err, cuid: api.getCurrentUserID(), e: event });
utils.logged("new_user " + event.threadID + " " + data1[event.senderID].name);
Expand All @@ -6796,14 +6804,7 @@ function isGoingToFast(api, event) {
});
});
}
if (!users.list.find((user) => event.senderID === user.id && user["name"])) {
api.getUserInfo(event.senderID, async (err, data1) => {
if (err) return handleError({ stacktrace: err, cuid: api.getCurrentUserID(), e: event });
utils.logged("old_user " + event.threadID + " " + data1[event.senderID].name);
updateUserData(data1, event.senderID);
reactMessage(api, event, ":heart:");
});
}

if (!users.bot.includes(event.senderID)) {
if (isItBotOrNot(api, event)) {
return true;
Expand Down

0 comments on commit 3d81d03

Please sign in to comment.