Skip to content

Commit

Permalink
Updated .rbxinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
Wizkiller96 committed Mar 15, 2024
1 parent 52ab939 commit c43405c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/WizBot/Modules/Roblox/Roblox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,13 @@ public async Task RbxInfo([Remainder] string username)
{
// Make a checker to see if a Roblox account exist before showing info.
JToken rbxInfo;
JToken rAvatar;
/*JToken rDevForum;*/
//JToken rDevForum;
//JToken rMT;
using (var http = _httpFactory.CreateClient())
{
rbxInfo = JObject.Parse(await http
.GetStringAsync($"https://wizbot.cc/api/v1/roblox/getPlayerInfo/{username}")
.ConfigureAwait(false));
rAvatar = JObject.Parse(await http
.GetStringAsync(
$"https://thumbnails.roblox.com/v1/users/avatar?userIds={rbxInfo["userId"]}&size=720x720&format=png&isCircular=false")
.ConfigureAwait(false));
/*rDevForum = JObject.Parse(await http
.GetStringAsync(
$"https://devforum.roblox.com/u/by-external/{rbxInfo["userId"]}.json")
Expand Down Expand Up @@ -94,12 +89,13 @@ await ctx.Channel.EmbedAsync(_eb.Create()
.WithAuthor($"{rbxInfo["username"]}'s Roblox Info",
"https://i.imgur.com/jDcWXPD.png",
"https://roblox.com")
.WithThumbnailUrl($"{rAvatar["data"]![0]!["imageUrl"]}")
.WithThumbnailUrl($"{rbxInfo["avatarBust"]}")
.AddField("Username",
$"[{rbxInfo["username"]}](https://www.roblox.com/users/{rbxInfo["userId"]}/profile)",
true)
.AddField("Display Name", $"{rbxInfo["displayName"]}", true)
.AddField("User ID", $"{rbxInfo["userId"]}", true)
.AddField("Verified Badge", $"{rbxInfo["verifiedBadge"]}", true)
.AddField("Friends", $"{rbxInfo["friendCount"]}", true)
.AddField("Followers", $"{rbxInfo["followerCount"]}", true)
.AddField("Following", $"{rbxInfo["followingCount"]}", true)
Expand Down

0 comments on commit c43405c

Please sign in to comment.