Пример #1
0
        public async Task <Tuple <User, MogmogOperationResult> > GetUser(string oAuth2Code)
        {
            if (string.IsNullOrEmpty(oAuth2Code))
            {
                return(new Tuple <User, MogmogOperationResult>(null, MogmogOperationResult.NoAuthentication));
            }
            var res = await DiscordOAuth2.Authorize(oAuth2Code);

            var userObj = await DiscordOAuth2.GetUserInfo(res);

            var id = userObj.Id;

            return(await GetUser(id));
        }