Conversation
| }, | ||
| ); | ||
| let { messagesCount } = memberData[0].dataValues; | ||
| let { points } = memberData[0].dataValues; |
There was a problem hiding this comment.
Hey! If you wanted to you could condense these two lines into one. When deconstructing a variable, you can add multiple items... For example here you could say let { messagesCount, points } = memberData[0].dataValues; and it would say the same thing with one less line of code. They could also be made a const too since they don't change.
package.json
Outdated
| "uuid": "^3.1.0" | ||
| }, | ||
| "devDependencies": { | ||
| "mysql": "^2.15.0" |
There was a problem hiding this comment.
What you are using mysql dependence for?
bot/client.js
Outdated
| // Check if its greater or equal to numberOfMessagesForBonus | ||
| if (messagesCount >= numberOfMessagesForBonus) { | ||
| points += amountOfBonusPoints; | ||
| messagesCount = 0; |
There was a problem hiding this comment.
Quick input, I noticed this is going to affect the points that users gain from regularly chatting. That feature directly uses the messagesCount to determine how many points the users have earned through chatting. If there would be a way to implement this without resetting the message count to zero each time that would be great.
No description provided.