This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
Repositories
Datasets
Forum
实训
竞赛
大数据
应用
Register
Sign In
youys
/
Discord.Net
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
34
Wiki
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
Browse Source
Merge pull request
#425
from FiniteReality/issue/424
Add mentionable property to ModifyGuildRoleParams
pull/429/head
RogueException
GitHub
8 years ago
parent
c1a9bdc142
2e2fbaa5f3
commit
ac4f007600
3 changed files
with
10 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-0
src/Discord.Net.Core/API/Rest/ModifyGuildRoleParams.cs
+7
-0
src/Discord.Net.Core/Entities/Roles/ModifyGuildRoleParams.cs
+1
-0
src/Discord.Net.Rest/Entities/Roles/RoleHelper.cs
+ 2
- 0
src/Discord.Net.Core/API/Rest/ModifyGuildRoleParams.cs
View File
@@ -16,5 +16,7 @@ namespace Discord.API.Rest
public Optional<uint> Color { get; set; }
[JsonProperty("hoist")]
public Optional<bool> Hoist { get; set; }
[JsonProperty("mentionable")]
public Optional<bool> Mentionable { get; set; }
}
}
+ 7
- 0
src/Discord.Net.Core/Entities/Roles/ModifyGuildRoleParams.cs
View File
@@ -47,5 +47,12 @@
/// If this role is the EveryoneRole, this value may not be set.
/// </remarks>
public Optional<bool> Hoist { get; set; }
/// <summary>
/// Whether or not this role can be mentioned.
/// </summary>
/// <remarks>
/// If this role is the EveryoneRole, this value may not be set.
/// </remarks>
public Optional<bool> Mentionable { get; set; }
}
}
+ 1
- 0
src/Discord.Net.Rest/Entities/Roles/RoleHelper.cs
View File
@@ -22,6 +22,7 @@ namespace Discord.Rest
{
Color = args.Color.IsSpecified ? args.Color.Value.RawValue : Optional.Create<uint>(),
Hoist = args.Hoist,
Mentionable = args.Mentionable,
Name = args.Name,
Permissions = args.Permissions.IsSpecified ? args.Permissions.Value.RawValue : Optional.Create<ulong>(),
Position = args.Position
Write
Preview
Loading…
Cancel
Save