-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Update and rename RadarBotList.ts to Radarcord.ts #575
base: master
Are you sure you want to change the base?
Conversation
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.
Hi, thanks for opening this PR!
I have a couple of comments on the changes, can you take a look?
/** | ||
* Returns a 1 or 0 depending on whether the user has voted for the bot | ||
* @param botID The bot's ID | ||
* @param userID The user's ID | ||
*/ | ||
getBotVotes(botID: IDResolvable, userID: IDResolvable) { | ||
return this._request( | ||
{ | ||
url: `/hasvoted/${Util.resolveID(userID)}/${Util.resolveID(botID)}` | ||
}, | ||
{ | ||
requiresToken: false | ||
} | ||
) | ||
} |
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.
/** | |
* Returns a 1 or 0 depending on whether the user has voted for the bot | |
* @param botID The bot's ID | |
* @param userID The user's ID | |
*/ | |
getBotVotes(botID: IDResolvable, userID: IDResolvable) { | |
return this._request( | |
{ | |
url: `/hasvoted/${Util.resolveID(userID)}/${Util.resolveID(botID)}` | |
}, | |
{ | |
requiresToken: false | |
} | |
) | |
} |
This is a duplicate from above
@@ -66,11 +66,70 @@ export default class RadarBotDirectory extends Service { | |||
getBotVotes(botID: IDResolvable, userID: IDResolvable) { | |||
return this._request( | |||
{ | |||
url: `/lastvoted/${Util.resolveID(userID)}/${Util.resolveID(botID)}`, | |||
headers: { Authorization: this.token } | |||
url: `/lastvoted/${Util.resolveID(userID)}/${Util.resolveID(botID)}` |
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.
Is this endpoint still in the API? Where is it documented in the docs?
Also, it's using the same name as below
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.
It's an API endpoint, just reminded me to add it to the documentation.
Should be called lastVoted() or something similar
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.
Yup, lastVoted()
will be fine 👍🏻
Co-authored-by: Federico Grandi <[email protected]>
Co-authored-by: Federico Grandi <[email protected]>
Co-authored-by: Federico Grandi <[email protected]>
No description provided.