Browse Source

Added IRole.IsMentionable

pull/308/head
RogueException 8 years ago
parent
commit
ba35f5bed1
4 changed files with 8 additions and 0 deletions
  1. +2
    -0
      src/Discord.Net.Core/API/Common/Role.cs
  2. +2
    -0
      src/Discord.Net.Core/Entities/Roles/IRole.cs
  3. +2
    -0
      src/Discord.Net.Rest/Entities/Roles/RestRole.cs
  4. +2
    -0
      src/Discord.Net.WebSocket/Entities/Roles/SocketRole.cs

+ 2
- 0
src/Discord.Net.Core/API/Common/Role.cs View File

@@ -13,6 +13,8 @@ namespace Discord.API
public uint Color { get; set; }
[JsonProperty("hoist")]
public bool Hoist { get; set; }
[JsonProperty("mentionable")]
public bool Mentionable { get; set; }
[JsonProperty("position")]
public int Position { get; set; }
[JsonProperty("permissions"), Int53]


+ 2
- 0
src/Discord.Net.Core/Entities/Roles/IRole.cs View File

@@ -15,6 +15,8 @@ namespace Discord
bool IsHoisted { get; }
/// <summary> Returns true if this role is automatically managed by Discord. </summary>
bool IsManaged { get; }
/// <summary> Returns true if this role may be mentioned in messages. </summary>
bool IsMentionable { get; }
/// <summary> Gets the name of this role. </summary>
string Name { get; }
/// <summary> Gets the permissions granted to members of this role. </summary>


+ 2
- 0
src/Discord.Net.Rest/Entities/Roles/RestRole.cs View File

@@ -13,6 +13,7 @@ namespace Discord.Rest
public Color Color { get; private set; }
public bool IsHoisted { get; private set; }
public bool IsManaged { get; private set; }
public bool IsMentionable { get; private set; }
public string Name { get; private set; }
public GuildPermissions Permissions { get; private set; }
public int Position { get; private set; }
@@ -35,6 +36,7 @@ namespace Discord.Rest
Name = model.Name;
IsHoisted = model.Hoist;
IsManaged = model.Managed;
IsMentionable = model.Mentionable;
Position = model.Position;
Color = new Color(model.Color);
Permissions = new GuildPermissions(model.Permissions);


+ 2
- 0
src/Discord.Net.WebSocket/Entities/Roles/SocketRole.cs View File

@@ -15,6 +15,7 @@ namespace Discord.WebSocket
public Color Color { get; private set; }
public bool IsHoisted { get; private set; }
public bool IsManaged { get; private set; }
public bool IsMentionable { get; private set; }
public string Name { get; private set; }
public GuildPermissions Permissions { get; private set; }
public int Position { get; private set; }
@@ -38,6 +39,7 @@ namespace Discord.WebSocket
Name = model.Name;
IsHoisted = model.Hoist;
IsManaged = model.Managed;
IsMentionable = model.Mentionable;
Position = model.Position;
Color = new Color(model.Color);
Permissions = new GuildPermissions(model.Permissions);


Loading…
Cancel
Save