passport-discord icon indicating copy to clipboard operation
passport-discord copied to clipboard

guilds.join?

Open rekkisomo opened this issue 8 years ago • 3 comments

By looking around the code, it seems that this isn't supported yet. May I ask when this will be implemented?

rekkisomo avatar May 15 '16 02:05 rekkisomo

Same issue here, did you get it working at some point?

Eastkap avatar Sep 17 '19 15:09 Eastkap

I ended up fixing this, in your passport.use call you need to add this bit :

var options = {
              method: 'PUT',
              url: `https://discordapp.com/api/guilds/${guildID}/members/${discordProfileID}`,
              headers: {
                authorization: 'Bot ${botToken}',
                'content-type': 'application/json'
              },
              body: {access_token:oAUTHAccessToken},
              json: true
};
            
request(options)

Eastkap avatar Sep 20 '19 09:09 Eastkap

Could you elaborate on exactly where in the passport.use call?

The-MG avatar Jun 01 '23 00:06 The-MG