Browse Source

Move IRole.ModifyAsync sample

pull/1218/head
Still Hsu 7 years ago
parent
commit
0cab2b04d8
No known key found for this signature in database GPG Key ID: 8601A145FDA95209
2 changed files with 16 additions and 10 deletions
  1. +4
    -10
      src/Discord.Net.Core/Entities/Roles/IRole.cs
  2. +12
    -0
      src/Discord.Net.Core/Entities/Roles/RoleProperties.cs

+ 4
- 10
src/Discord.Net.Core/Entities/Roles/IRole.cs View File

@@ -69,16 +69,10 @@ namespace Discord
/// <summary>
/// Modifies this role.
/// </summary>
/// <example>
/// <code language="cs">
/// await role.ModifyAsync(x =&gt;
/// {
/// x.Name = "Sonic";
/// x.Color = new Color(0x1A50BC);
/// x.Mentionable = true;
/// });
/// </code>
/// </example>
/// <remarks>
/// This method modifies this role with the specified properties. To see an example of this
/// method and what properties are available, please refer to <see cref="RoleProperties"/>.
/// </remarks>
/// <param name="func">A delegate containing the properties to modify the role with.</param>
/// <param name="options">The options to be used when sending the request.</param>
/// <returns>


+ 12
- 0
src/Discord.Net.Core/Entities/Roles/RoleProperties.cs View File

@@ -3,6 +3,18 @@ namespace Discord
/// <summary>
/// Properties that are used to modify an <see cref="IRole" /> with the specified changes.
/// </summary>
/// <example>
/// The following example modifies the role to a mentionable one, renames the role into <c>Sonic</c>, and
/// changes the color to a light-blue.
/// <code language="cs">
/// await role.ModifyAsync(x =&gt;
/// {
/// x.Name = "Sonic";
/// x.Color = new Color(0x1A50BC);
/// x.Mentionable = true;
/// });
/// </code>
/// </example>
/// <seealso cref="IRole.ModifyAsync" />
public class RoleProperties
{


Loading…
Cancel
Save