diff --git a/DisCatSharp.ThirdPartyLookups/Entities/Mee6 Leaderboard/Mee6Leaderboard.cs b/DisCatSharp.ThirdPartyLookups/Entities/Mee6 Leaderboard/Mee6Leaderboard.cs
index 4d94cff20..222b3dbdd 100644
--- a/DisCatSharp.ThirdPartyLookups/Entities/Mee6 Leaderboard/Mee6Leaderboard.cs
+++ b/DisCatSharp.ThirdPartyLookups/Entities/Mee6 Leaderboard/Mee6Leaderboard.cs
@@ -1,111 +1,111 @@
// This file is part of the DisCatSharp project, based off DSharpPlus.
//
// Copyright (c) 2021-2022 AITSYS
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace DisCatSharp.ThirdPartyLookups.Entities;
///
/// A Mee6 Leaderboard.
///
public class Mee6Leaderboard
{
///
/// Gets the guild.
///
[JsonProperty("guild")]
public Mee6Guild? Guild { get; internal set; }
///
/// Gets the country this guild is set to.
///
[JsonProperty("country")]
public string? Country { get; internal set; }
///
/// Whether Mee6 is an Administrator on this guild.
///
[JsonProperty("admin")]
public bool? IsAdmin { get; internal set; }
///
/// Gets a list of users.
///
[JsonProperty("players")]
public Mee6User[]? Users { get; internal set; }
///
/// Gets the role rewards you can achieve on this server.
///
[JsonProperty("role_rewards")]
- public object[]? RoleRewards { get; internal set; }
+ public Mee6LevelReward[]? RoleRewards { get; internal set; }
///
/// The background this guild uses for their level-up messages.
///
[JsonProperty("banner_url")]
public string? BannerUrl { get; internal set; }
///
/// Gets how much experience you get per message on this guild.
///
[JsonProperty("xp_per_message")]
public int[]? ExperiencePerMessage { get; internal set; }
///
/// Gets the rate at which you gain experience on this guild.
///
[JsonProperty("xp_rate")]
public float? ExperienceRate { get; internal set; }
///
/// Gets the leaderboard page that has been fetched.
///
[JsonProperty("page")]
public int? Page { get; internal set; }
///
/// Unknown
///
[JsonProperty("is_member")]
public bool? IsMember { get; internal set; }
///
/// Unknown
///
[JsonProperty("user_guild_settings")]
public object? UserGuildSettings { get; internal set; }
///
/// Unknown
///
[JsonProperty("player")]
public object? Player { get; internal set; }
}
diff --git a/DisCatSharp.ThirdPartyLookups/Entities/Mee6 Leaderboard/Mee6LevelReward.cs b/DisCatSharp.ThirdPartyLookups/Entities/Mee6 Leaderboard/Mee6LevelReward.cs
new file mode 100644
index 000000000..8028fdd6c
--- /dev/null
+++ b/DisCatSharp.ThirdPartyLookups/Entities/Mee6 Leaderboard/Mee6LevelReward.cs
@@ -0,0 +1,49 @@
+// This file is part of the DisCatSharp project, based off DSharpPlus.
+//
+// Copyright (c) 2021-2022 AITSYS
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Newtonsoft.Json;
+
+namespace DisCatSharp.ThirdPartyLookups.Entities;
+
+///
+/// A level reward within the mee6 api.
+///
+public class Mee6LevelReward
+{
+ ///
+ /// The rank at which this role is applied.
+ ///
+ [JsonProperty("rank")]
+ public int Rank { get; internal set; }
+
+ ///
+ /// The role which will be applied.
+ ///
+ [JsonProperty("role")]
+ public Mee6Role? Role { get; internal set; }
+}
diff --git a/DisCatSharp.ThirdPartyLookups/Entities/Mee6 Leaderboard/Mee6User.cs b/DisCatSharp.ThirdPartyLookups/Entities/Mee6 Leaderboard/Mee6Role.cs
similarity index 55%
copy from DisCatSharp.ThirdPartyLookups/Entities/Mee6 Leaderboard/Mee6User.cs
copy to DisCatSharp.ThirdPartyLookups/Entities/Mee6 Leaderboard/Mee6Role.cs
index e2c15a249..c7c09c716 100644
--- a/DisCatSharp.ThirdPartyLookups/Entities/Mee6 Leaderboard/Mee6User.cs
+++ b/DisCatSharp.ThirdPartyLookups/Entities/Mee6 Leaderboard/Mee6Role.cs
@@ -1,113 +1,114 @@
// This file is part of the DisCatSharp project, based off DSharpPlus.
//
// Copyright (c) 2021-2022 AITSYS
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
using System;
using System.Collections.Generic;
-using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using DisCatSharp.Entities;
using DisCatSharp.Enums;
-using DisCatSharp.Net;
using Newtonsoft.Json;
namespace DisCatSharp.ThirdPartyLookups.Entities;
///
-/// A user represented in a Mee6 Leaderboard.
+/// A role represented by mee6.
///
-public class Mee6User
+public class Mee6Role
{
///
- /// The id of this guild.
+ /// The id of this role.
///
[JsonProperty("id")]
internal string? _Id { get; set; }
///
- /// The id of this guild.
+ /// The id of this role.
///
[JsonIgnore]
public ulong Id => Convert.ToUInt64(this._Id);
///
- /// The username of this user.
+ /// The name of this role.
///
- [JsonProperty("username")]
- public string? Username { get; set; }
+ [JsonProperty("name")]
+ public string? Name { get; internal set; }
- ///
- /// The discriminator of this user.
- ///
- [JsonProperty("discriminator")]
- public string? Discriminator { get; set; }
+ [JsonProperty("color")]
+ internal int _Color { get; set; }
///
- /// The username and discriminator combined. E.g. User#0001
+ /// The color of this role.
///
- public string UsernameWithDiscriminator => $"{this.Username}#{this.Discriminator}";
+ [JsonIgnore]
+ public DiscordColor Color
+ => new DiscordColor(this._Color);
///
- /// The hash of the users' avatar.
+ /// Whether the role is hoisted.
///
- [JsonProperty("avatar")]
- public string? AvatarHash { get; set; }
+ [JsonProperty("hoist")]
+ public bool IsHoisted { get; internal set; }
///
- /// Gets the user's avatar url.
+ /// The hash of the role icon.
///
- [JsonIgnore]
- public string? AvatarUrl
- => !string.IsNullOrWhiteSpace(this.AvatarHash) ? $"{DiscordDomain.GetDomain(CoreDomain.DiscordCdn).Url}{Endpoints.AVATARS}/{this.Id.ToString(CultureInfo.InvariantCulture)}/{this.AvatarHash}.{(this.AvatarHash.StartsWith("a_") ? "gif" : "png")}?size=1024" : null;
+ [JsonProperty("icon")]
+ public string? IconHash { get; internal set; }
///
- /// The id of the guild this user belongs to.
+ /// Whether the role is managed.
///
- [JsonProperty("guild_id")]
- public string? GuildId { get; set; }
+ [JsonProperty("managed")]
+ public bool IsManaged { get; internal set; }
///
- /// How many messages the user wrote.
+ /// Whether the role is mentionable.
///
- [JsonProperty("message_count")]
- public int? MessageCount { get; set; }
+ [JsonProperty("mentionable")]
+ public bool IsMentionable { get; internal set; }
+
+ [JsonProperty("permissions")]
+ internal long _Permissions { get; set; }
///
- /// The current level of this user.
+ /// The permissions of this role.
///
- [JsonProperty("level")]
- public int? Level { get; set; }
+ [JsonIgnore]
+ public Permissions Permissions
+ => (Permissions)this._Permissions;
///
- /// The current experience of this user.
+ /// The position of this role.
///
- [JsonProperty("xp")]
- public int? Experience { get; set; }
+ [JsonProperty("position")]
+ public int Position { get; internal set; }
///
- /// Detailed information about the users' experience.
+ /// The Unicode Emoji for this role.
///
- [JsonProperty("detailed_xp")]
- public int[]? DetailedExperience { get; set; }
+ [JsonProperty("unicode_emoji")]
+ public string? UnicodeEmoji { get; internal set; }
}
diff --git a/DisCatSharp.ThirdPartyLookups/Entities/Mee6 Leaderboard/Mee6User.cs b/DisCatSharp.ThirdPartyLookups/Entities/Mee6 Leaderboard/Mee6User.cs
index e2c15a249..0c9f382b5 100644
--- a/DisCatSharp.ThirdPartyLookups/Entities/Mee6 Leaderboard/Mee6User.cs
+++ b/DisCatSharp.ThirdPartyLookups/Entities/Mee6 Leaderboard/Mee6User.cs
@@ -1,113 +1,113 @@
// This file is part of the DisCatSharp project, based off DSharpPlus.
//
// Copyright (c) 2021-2022 AITSYS
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DisCatSharp.Enums;
using DisCatSharp.Net;
using Newtonsoft.Json;
namespace DisCatSharp.ThirdPartyLookups.Entities;
///
/// A user represented in a Mee6 Leaderboard.
///
public class Mee6User
{
///
- /// The id of this guild.
+ /// The id of this user.
///
[JsonProperty("id")]
internal string? _Id { get; set; }
///
- /// The id of this guild.
+ /// The id of this user.
///
[JsonIgnore]
public ulong Id => Convert.ToUInt64(this._Id);
///
/// The username of this user.
///
[JsonProperty("username")]
public string? Username { get; set; }
///
/// The discriminator of this user.
///
[JsonProperty("discriminator")]
public string? Discriminator { get; set; }
///
/// The username and discriminator combined. E.g. User#0001
///
public string UsernameWithDiscriminator => $"{this.Username}#{this.Discriminator}";
///
/// The hash of the users' avatar.
///
[JsonProperty("avatar")]
public string? AvatarHash { get; set; }
///
/// Gets the user's avatar url.
///
[JsonIgnore]
public string? AvatarUrl
=> !string.IsNullOrWhiteSpace(this.AvatarHash) ? $"{DiscordDomain.GetDomain(CoreDomain.DiscordCdn).Url}{Endpoints.AVATARS}/{this.Id.ToString(CultureInfo.InvariantCulture)}/{this.AvatarHash}.{(this.AvatarHash.StartsWith("a_") ? "gif" : "png")}?size=1024" : null;
///
/// The id of the guild this user belongs to.
///
[JsonProperty("guild_id")]
public string? GuildId { get; set; }
///
/// How many messages the user wrote.
///
[JsonProperty("message_count")]
public int? MessageCount { get; set; }
///
/// The current level of this user.
///
[JsonProperty("level")]
public int? Level { get; set; }
///
/// The current experience of this user.
///
[JsonProperty("xp")]
public int? Experience { get; set; }
///
/// Detailed information about the users' experience.
///
[JsonProperty("detailed_xp")]
public int[]? DetailedExperience { get; set; }
}