Skip to content

Commit

Permalink
Added some new fields related to Nitro Boosting
Browse files Browse the repository at this point in the history
Added enums for Guild MFA/Verification Level
  • Loading branch information
Trickyyy committed Jul 17, 2019
1 parent a623f8f commit 942ea14
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 5 deletions.
22 changes: 19 additions & 3 deletions Oxide.Ext.Discord/DiscordObjects/Guild.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class Guild

public string embed_channel_id { get; set; }

public int? verification_level { get; set; }
public GuildVerificationLevel? verification_level { get; set; }

public int? default_message_notifications { get; set; }

Expand All @@ -39,14 +39,16 @@ public class Guild

public List<string> features { get; set; }

public int? mfa_level { get; set; }
public GuildMFALevel? mfa_level { get; set; }

public string application_id { get; set; }

public bool? widget_enabled { get; set; }

public string widget_channel_id { get; set; }

public string system_channel_id { get; set; }

public string joined_at { get; set; }

public bool? large { get; set; }
Expand All @@ -63,7 +65,21 @@ public class Guild

public List<Presence> presences { get; set; }

public static void CreateGuild(DiscordClient client, string name, string region, string icon, int? verificationLevel, int? defaultMessageNotifications, List<Role> roles, List<Channel> channels, Action<Guild> callback = null)
public int? max_presences { get; set; }

public int? max_members { get; set; }

public string vanity_url_code { get; set; }

public string description { get; set; }

public string banner { get; set; }

public GuildPremiumTier? premium_tier { get; set; }

public int? premium_subscription_count { get; set; }

public static void CreateGuild(DiscordClient client, string name, string region, string icon, GuildVerificationLevel? verificationLevel, int? defaultMessageNotifications, List<Role> roles, List<Channel> channels, Action<Guild> callback = null)
{
var jsonObj = new Dictionary<string, object>()
{
Expand Down
8 changes: 8 additions & 0 deletions Oxide.Ext.Discord/DiscordObjects/GuildMFALevel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Oxide.Ext.Discord.DiscordObjects
{
public enum GuildMFALevel
{
None = 0,
Elevated = 1
}
}
10 changes: 10 additions & 0 deletions Oxide.Ext.Discord/DiscordObjects/GuildPremiumTier.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace Oxide.Ext.Discord.DiscordObjects
{
public enum GuildPremiumTier
{
None = 0,
Tier1 = 1,
Tier2 = 2,
Tier3 = 3
}
}
11 changes: 11 additions & 0 deletions Oxide.Ext.Discord/DiscordObjects/GuildVerificationLevel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace Oxide.Ext.Discord.DiscordObjects
{
public enum GuildVerificationLevel
{
None = 0,
Low = 1,
Medium = 2,
High = 3,
VeryHigh = 4
}
}
2 changes: 1 addition & 1 deletion Oxide.Ext.Discord/DiscordObjects/User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class User

public string email { get; set; }

public PremiumType? premium_type { get; set; }
public UserPremiumType? premium_type { get; set; }

public static void GetCurrentUser(DiscordClient client, Action<User> callback = null)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Oxide.Ext.Discord.DiscordObjects
{
public enum PremiumType
public enum UserPremiumType
{
NitroClassic = 1,
Nitro = 2
Expand Down

0 comments on commit 942ea14

Please sign in to comment.