Skip to content

Commit

Permalink
Back to using the UserID from Vulpine as it been fixed in the api.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wizkiller96 committed Dec 5, 2018
1 parent 0137251 commit 896d611
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions WizBot.Core/Modules/Vulpine/Vulpine.cs
Expand Up @@ -43,13 +43,13 @@ public async Task RInfo([Remainder] string username = null)
// Todo make a checker to see if a Roblox account exist before showing info.
JToken RChecker;
JToken RInfo;
JToken RUID;
//JToken RUID; // Backup incase Vulpine one breaks
JToken RStatus;
using (var http = _httpFactory.CreateClient())
{
RChecker = JObject.Parse(await http.GetStringAsync($"https://www.roblox.com/UserCheck/doesusernameexist?username={username}").ConfigureAwait(false));
RInfo = JObject.Parse(await http.GetStringAsync($"https://vulpineutility.net/api/v1/getPlayerInfo/username/{username}").ConfigureAwait(false));
RUID = JObject.Parse(await http.GetStringAsync($"http://api.roblox.com/users/get-by-username?username={username}").ConfigureAwait(false));
//RUID = JObject.Parse(await http.GetStringAsync($"http://api.roblox.com/users/get-by-username?username={username}").ConfigureAwait(false));
RStatus = JObject.Parse(await http.GetStringAsync($"http://api.roblox.com/users/{RUID["Id"]}/onlinestatus").ConfigureAwait(false));
}
// Currently doesn't work at this time. If you know a sulotion feel free to try.
Expand All @@ -72,8 +72,8 @@ await Context.Channel.EmbedAsync(new EmbedBuilder().WithColor(Color.Blue)
.WithIconUrl("https://i.imgur.com/cqx791R.jpg")
.WithName($"Vulpine - Roblox Info"))
.WithThumbnailUrl($"http://www.roblox.com:80/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username={RInfo["username"]}")
.AddField(fb => fb.WithName("Username").WithValue($"[{RInfo["username"]}](https://www.roblox.com/users/{RUID["Id"]}/profile)").WithIsInline(true))
.AddField(fb => fb.WithName("User ID").WithValue($"{RUID["Id"]}").WithIsInline(true))
.AddField(fb => fb.WithName("Username").WithValue($"[{RInfo["username"]}](https://www.roblox.com/users/{RInfo["userId"]}/profile)").WithIsInline(true))
.AddField(fb => fb.WithName("User ID").WithValue($"{RInfo["userId"]}").WithIsInline(true))
.AddField(fb => fb.WithName("Presence").WithValue($"{RStatus["LastLocation"]}").WithIsInline(true))
.AddField(fb => fb.WithName("Account Age").WithValue($"{RInfo["age"]}").WithIsInline(true))
.AddField(fb => fb.WithName("Join Date").WithValue($"{RInfo["joinDate"]:MM.dd.yyyy HH:mm}").WithIsInline(true))
Expand All @@ -86,7 +86,7 @@ await Context.Channel.EmbedAsync(new EmbedBuilder().WithColor(Color.Blue)
.WithIconUrl("https://i.imgur.com/cqx791R.jpg")
.WithName($"Vulpine - Roblox Info"))
.WithThumbnailUrl($"http://www.roblox.com:80/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username={RInfo["username"]}")
.AddField(fb => fb.WithName("Username").WithValue($"[{RInfo["username"]}](https://www.roblox.com/users/{RInfo["userid"]}/profile)").WithIsInline(true))
.AddField(fb => fb.WithName("Username").WithValue($"[{RInfo["username"]}](https://www.roblox.com/users/{RInfo["userId"]}/profile)").WithIsInline(true))
.AddField(fb => fb.WithName("User ID").WithValue($"{RInfo["userid"]}").WithIsInline(true))
.AddField(fb => fb.WithName("Presence").WithValue($"{RStatus["LastLocation"]}").WithIsInline(true))
.AddField(fb => fb.WithName("Account Age").WithValue($"{RInfo["age"]}").WithIsInline(true))
Expand All @@ -101,8 +101,8 @@ await Context.Channel.EmbedAsync(new EmbedBuilder().WithColor(Color.Blue)
.WithIconUrl("https://i.imgur.com/cqx791R.jpg")
.WithName($"Vulpine - Roblox Info"))
.WithThumbnailUrl($"http://www.roblox.com:80/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username={RInfo["username"]}")
.AddField(fb => fb.WithName("Username").WithValue($"[{RInfo["username"]}](https://www.roblox.com/users/{RUID["Id"]}/profile)").WithIsInline(true))
.AddField(fb => fb.WithName("User ID").WithValue($"{RUID["Id"]}").WithIsInline(true))
.AddField(fb => fb.WithName("Username").WithValue($"[{RInfo["username"]}](https://www.roblox.com/users/{RInfo["userId"]}/profile)").WithIsInline(true))
.AddField(fb => fb.WithName("User ID").WithValue($"{RInfo["userId"]}").WithIsInline(true))
.AddField(fb => fb.WithName("Presence").WithValue($"{RStatus["LastLocation"]}").WithIsInline(true))
.AddField(fb => fb.WithName("Account Age").WithValue($"{RInfo["age"]}").WithIsInline(true))
.AddField(fb => fb.WithName("Join Date").WithValue($"{RInfo["joinDate"]:MM.dd.yyyy HH:mm}").WithIsInline(true))
Expand All @@ -116,8 +116,8 @@ await Context.Channel.EmbedAsync(new EmbedBuilder().WithColor(Color.Blue)
.WithIconUrl("https://i.imgur.com/cqx791R.jpg")
.WithName($"Vulpine - Roblox Info"))
.WithThumbnailUrl($"http://www.roblox.com:80/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username={RInfo["username"]}")
.AddField(fb => fb.WithName("Username").WithValue($"[{RInfo["username"]}](https://www.roblox.com/users/{RUID["Id"]}/profile)").WithIsInline(true))
.AddField(fb => fb.WithName("User ID").WithValue($"{RUID["Id"]}").WithIsInline(true))
.AddField(fb => fb.WithName("Username").WithValue($"[{RInfo["username"]}](https://www.roblox.com/users/{RInfo["userId"]}/profile)").WithIsInline(true))
.AddField(fb => fb.WithName("User ID").WithValue($"{RInfo["userId"]}").WithIsInline(true))
.AddField(fb => fb.WithName("Presence").WithValue($"{RStatus["LastLocation"]}".TrimTo(50)).WithIsInline(true))
.AddField(fb => fb.WithName("Account Age").WithValue($"{RInfo["age"]}").WithIsInline(true))
.AddField(fb => fb.WithName("Join Date").WithValue($"{RInfo["joinDate"]:MM.dd.yyyy HH:mm}").WithIsInline(true))
Expand Down

0 comments on commit 896d611

Please sign in to comment.