discord-rpc-csharp icon indicating copy to clipboard operation
discord-rpc-csharp copied to clipboard

Added Authorize Command.

Open skaughtx0r opened this issue 1 year ago • 5 comments

This PR adds support for the Authorize command. I needed to be able to request additional scopes. This allows me to have the authorization prompt show up in the discord client app.

skaughtx0r avatar Mar 26 '24 23:03 skaughtx0r

Thank you for your contribution ❤ I am current unwell at the moment but will try to get to review your PR soon :)

Lachee avatar Mar 28 '24 00:03 Lachee

Looking great so far, just that minor tweak and it should be good to PR. Would you be able to provide some additional information on what you can do once you have the authorized code?

Lachee avatar Apr 02 '24 06:04 Lachee

I'm using the authcode returned by the Authorize command to Authenticate with the REST API. From there I'm hitting the https://discordapp.com/api/users/@me/guilds/{GuildID}/member for my game's discord server to see if the user has a role assigned to give them access to extra stuff in the game.

I'm not sure how to fix the issues in the static analysis. My implementation is identical to the code you already had in there for other commands, they seem like false positives.

skaughtx0r avatar Apr 02 '24 20:04 skaughtx0r

I'm using the authcode returned by the Authorize command to Authenticate with the REST API. From there I'm hitting the https://discordapp.com/api/users/@me/guilds/{GuildID}/member for my game's discord server to see if the user has a role assigned to give them access to extra stuff in the game.

I'm not sure how to fix the issues in the static analysis. My implementation is identical to the code you already had in there for other commands, they seem like false positives.

Dont worry about the static code analysis, that is just a general thumb to ensure quality and not strict. I just need the review i posted to be resolved before I accept this PR :)

Lachee avatar Apr 06 '24 08:04 Lachee

Oh weird, I don't see any reviews:

image

skaughtx0r avatar Apr 06 '24 15:04 skaughtx0r