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

Commit

Permalink
Merge pull request #67 from mrepol742/master
Browse files Browse the repository at this point in the history
Initial Commit
  • Loading branch information
mrepol742 authored Feb 5, 2024
2 parents bb1b116 + f400024 commit d518c39
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6595,11 +6595,7 @@ 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) ||
// update old user data to newer ones
!!users.list.find((user) => event.senderID === user.id && user["name"] === undefined)
) {
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 @@ -6624,6 +6620,14 @@ function isGoingToFast(api, event) {
});
});
}
if (!!users.list.find((user) => event.senderID === user.id && user["name"] === undefined)) {
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 d518c39

Please sign in to comment.