Versiion 0.2.3 - Ajout Handle Case Discriminator
This commit is contained in:
		@@ -1,39 +1 @@
 | 
				
			|||||||
[
 | 
					[]
 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    "auth": {
 | 
					 | 
				
			||||||
      "token_type": "Bearer",
 | 
					 | 
				
			||||||
      "access_token": "jY17lCWaOpTdPQCnz50kfNm7ABpsGz",
 | 
					 | 
				
			||||||
      "expires_in": 604800,
 | 
					 | 
				
			||||||
      "refresh_token": "3TronknZ7j5kVSDBjI3OechmCYF8ck",
 | 
					 | 
				
			||||||
      "scope": "identify guilds guilds.members.read"
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    "avatar": null,
 | 
					 | 
				
			||||||
    "communication_disabled_until": null,
 | 
					 | 
				
			||||||
    "flags": 0,
 | 
					 | 
				
			||||||
    "joined_at": "2023-03-06T18:20:23.413000+00:00",
 | 
					 | 
				
			||||||
    "nick": "Raphix",
 | 
					 | 
				
			||||||
    "pending": false,
 | 
					 | 
				
			||||||
    "premium_since": null,
 | 
					 | 
				
			||||||
    "roles": [
 | 
					 | 
				
			||||||
      "397725552968204288"
 | 
					 | 
				
			||||||
    ],
 | 
					 | 
				
			||||||
    "user": {
 | 
					 | 
				
			||||||
      "id": "486943594893017119",
 | 
					 | 
				
			||||||
      "username": "raphixscrap",
 | 
					 | 
				
			||||||
      "avatar": "7129e80c23aa3ba3d2d45814dd352a29",
 | 
					 | 
				
			||||||
      "discriminator": "0",
 | 
					 | 
				
			||||||
      "public_flags": 4194368,
 | 
					 | 
				
			||||||
      "flags": 4194368,
 | 
					 | 
				
			||||||
      "banner": null,
 | 
					 | 
				
			||||||
      "accent_color": 10712214,
 | 
					 | 
				
			||||||
      "global_name": "Raphix",
 | 
					 | 
				
			||||||
      "avatar_decoration_data": null,
 | 
					 | 
				
			||||||
      "banner_color": "#a37496"
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    "mute": false,
 | 
					 | 
				
			||||||
    "deaf": false,
 | 
					 | 
				
			||||||
    "bio": "",
 | 
					 | 
				
			||||||
    "banner": null,
 | 
					 | 
				
			||||||
    "token": "7149b971-4595-496c-a541-4c687a37ffd6"
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
]
 | 
					 | 
				
			||||||
@@ -74,9 +74,7 @@ module.exports.getDiscordUser = function (code, session) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                    var user = {}
 | 
					                    var user = {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    console.log(userInfo)
 | 
					                    if(!userInfo.user.global_name) {
 | 
				
			||||||
 | 
					 | 
				
			||||||
                    if(userInfo.user.discriminator) {
 | 
					 | 
				
			||||||
                        reject("MIGRATE_ACCOUNT_ONLY")
 | 
					                        reject("MIGRATE_ACCOUNT_ONLY")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user