-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added bot message for the first time praisers #516
Conversation
@@ -67,6 +68,9 @@ export const praiseHandler: CommandHandler = async ( | |||
} | |||
|
|||
const userAccount = await getUserAccount(member as GuildMember); | |||
const praiseItems = await PraiseModel.find({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have any huge performance concerns here since praising is relatively infequent. But yes, this does seem like an overly expensive call. To begin with I'd suggest we try doing PraiseModel.countDocuments(
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that should make this more feasible 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! ✨
Resolves #459