| @@ -50,6 +50,11 @@ namespace Discord | |||||
| /// This value may not be set if the role is an @everyone role. | /// This value may not be set if the role is an @everyone role. | ||||
| /// </remarks> | /// </remarks> | ||||
| public Optional<bool> Hoist { get; set; } | public Optional<bool> Hoist { get; set; } | ||||
| /// <summary> | |||||
| /// Gets or sets the icon of the role. | |||||
| /// </summary> | |||||
| public Optional<Image> Icon { get; set; } | |||||
| /// <summary> | /// <summary> | ||||
| /// Gets or sets whether or not this role can be mentioned. | /// Gets or sets whether or not this role can be mentioned. | ||||
| /// </summary> | /// </summary> | ||||
| @@ -13,6 +13,8 @@ namespace Discord.API.Rest | |||||
| public Optional<uint> Color { get; set; } | public Optional<uint> Color { get; set; } | ||||
| [JsonProperty("hoist")] | [JsonProperty("hoist")] | ||||
| public Optional<bool> Hoist { get; set; } | public Optional<bool> Hoist { get; set; } | ||||
| [JsonProperty("icon")] | |||||
| public Optional<Image> Icon { get; set; } | |||||
| [JsonProperty("mentionable")] | [JsonProperty("mentionable")] | ||||
| public Optional<bool> Mentionable { get; set; } | public Optional<bool> Mentionable { get; set; } | ||||
| } | } | ||||
| @@ -24,7 +24,8 @@ namespace Discord.Rest | |||||
| Hoist = args.Hoist, | Hoist = args.Hoist, | ||||
| Mentionable = args.Mentionable, | Mentionable = args.Mentionable, | ||||
| Name = args.Name, | Name = args.Name, | ||||
| Permissions = args.Permissions.IsSpecified ? args.Permissions.Value.RawValue.ToString() : Optional.Create<string>() | |||||
| Permissions = args.Permissions.IsSpecified ? args.Permissions.Value.RawValue.ToString() : Optional.Create<string>(), | |||||
| Icon = args.Icon.IsSpecified ? args.Icon.Value.ToModel() : Optional<API.Image>.Unspecified | |||||
| }; | }; | ||||
| var model = await client.ApiClient.ModifyGuildRoleAsync(role.Guild.Id, role.Id, apiArgs, options).ConfigureAwait(false); | var model = await client.ApiClient.ModifyGuildRoleAsync(role.Guild.Id, role.Id, apiArgs, options).ConfigureAwait(false); | ||||