Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ScorprianDev
Copy link

No description provided.

Copy link
Member

@EndBug EndBug left a 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?

src/Interface/Lists/Radarcord.ts Outdated Show resolved Hide resolved
src/Interface/Lists/Radarcord.ts Outdated Show resolved Hide resolved
src/Interface/Lists/Radarcord.ts Outdated Show resolved Hide resolved
Comment on lines +107 to +121
/**
* 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
}
)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/**
* 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)}`
Copy link
Member

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

Copy link
Author

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

Copy link
Member

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 👍🏻

ScorprianDev and others added 3 commits January 27, 2023 09:45
Co-authored-by: Federico Grandi <fgrandi30@gmail.com>
Co-authored-by: Federico Grandi <fgrandi30@gmail.com>
Co-authored-by: Federico Grandi <fgrandi30@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants