You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- [ ] The title of this issue follows the command name: brief description of request format, e.g. /help: add optional @user parameter
The following checkbox is OPTIONAL:
I would like to be assigned this issue to work on it
1. Description of the Feature Request:
We currently duplicate the code for checking if an user is an "admin" in a number of places using roughly this snippet[1]
We can certainly extract out the logic for isAdmin to a util function. Can just pass in the member so we have like const isAdminMessage = isAdmin(message.member) and const isAdminUser = isAdmin(authorMember) or equivalent.
Complete the following REQUIRED checkboxes:
- [ ] The title of this issue follows thecommand name: brief description of request
format, e.g./help: add optional @user parameter
The following checkbox is OPTIONAL:
1. Description of the Feature Request:
We currently duplicate the code for checking if an user is an "admin" in a number of places using roughly this snippet[1]
this duplicates code, and also can be simplified to
It would be beneficial to abstract this functionality out to a new
is-admin.js
file in/utils
[1] Taken from
points.js
2. Acceptance Criteria:
The text was updated successfully, but these errors were encountered: