speedruncomorg / api

REST API Documentation for speedrun.com
348 stars 35 forks source link

No way to get user's Discord #59

Open nihaals opened 7 years ago

s5bug commented 7 years ago

Ask the user for their API key and get their Speedrun.com profile from that. It may not be getting Discord from Srcom, but it should still work for the purpose.

mat1jaczyyy commented 6 years ago

Any updates on whether this issue is planned to be addressed?

We are a small speedrunning community running a Discord bot, we would love to automatically give people certain roles in correlation to their speedrunning achievements but for us there is simply no way to link the user's SRC account other than asking each person to enter it individually. Logging in is not an option, because Discord bots are solely text-based.

It would be nice if there was a call to pull an user's Discord ID for this purpose.

s5bug commented 6 years ago

I have made a bot that can get your SrCom account. Unfortunately, I am rewriting it and unable to host it until the summer.

What I did is have the bot request your SrCom API Key and you could DM it with said key and it would link your SrCom on it.

On Wed, Jan 24, 2018, 5:15 PM mat1jaczyyy notifications@github.com wrote:

Any updates on whether this issue is planned to be addressed?

We are a small speedrunning community running a Discord bot, we would love to automatically give people certain roles in correlation to their speedrunning achievements but for us there is simply no way to link the user's SRC account other than asking each person to enter it individually. Logging in is not an option, because Discord bots are solely text-based.

It would be nice if there was a call to pull an user's Discord ID for this purpose.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/speedruncomorg/api/issues/59#issuecomment-360328920, or mute the thread https://github.com/notifications/unsubscribe-auth/AHZGgPAFLIcW2wROswjrh2cpr6L6IOEDks5tN9W4gaJpZM4PphNF .

s5bug commented 6 years ago

Didn't see the part about manual entry. Ignore above post :)

On Wed, Jan 24, 2018, 5:19 PM Anthony Cerruti aprime2003@gmail.com wrote:

I have made a bot that can get your SrCom account. Unfortunately, I am rewriting it and unable to host it until the summer.

What I did is have the bot request your SrCom API Key and you could DM it with said key and it would link your SrCom on it.

On Wed, Jan 24, 2018, 5:15 PM mat1jaczyyy notifications@github.com wrote:

Any updates on whether this issue is planned to be addressed?

We are a small speedrunning community running a Discord bot, we would love to automatically give people certain roles in correlation to their speedrunning achievements but for us there is simply no way to link the user's SRC account other than asking each person to enter it individually. Logging in is not an option, because Discord bots are solely text-based.

It would be nice if there was a call to pull an user's Discord ID for this purpose.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/speedruncomorg/api/issues/59#issuecomment-360328920, or mute the thread https://github.com/notifications/unsubscribe-auth/AHZGgPAFLIcW2wROswjrh2cpr6L6IOEDks5tN9W4gaJpZM4PphNF .

kyraaan commented 5 years ago

Is there any update on this? This post was made almost a year and a half ago

mat1jaczyyy commented 5 years ago

I've personally moved on to other projects, never having implemented it. But I think the best workaround is to HTTP GET the user's profile page, as a normal web browser would, parse it and extract Discord ID.

On a side note, I find it funny that a full year later, I now recognize the character in sorenbug's profile picture, having gotten myself deep into modding that game in the meantime ;)

kyraaan commented 5 years ago

hey mat1 thanks for the quick response! I think your suggestion is probably the best way, i'll give that a shot. Still hoping one day this will be implemented haha. They have everything else but discord :(

oauo commented 1 year ago

This would be nice, just resorted to scraping their profile (use the /info page as there's less content to load). A user just requests to link their Discord to SR and provide their username, scrape the page and grab the username and discriminator and compare.

Definitely would like to see this just be an API call as scraping is just never ideal