Class EmbedAuthorBuilder
Represents a builder class for a author field.
Inheritance
Inherited Members
Namespace: Discord
Assembly: Discord.Net.Core.dll
Syntax
public class EmbedAuthorBuilder
Fields
| Improve this Doc View SourceMaxAuthorNameLength
Gets the maximum author name length allowed by Discord.
Declaration
public const int MaxAuthorNameLength = 256
Field Value
| Type | Description |
|---|---|
| System.Int32 |
Properties
| Improve this Doc View SourceIconUrl
Gets or sets the icon URL of the author field.
Declaration
public string IconUrl { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The icon URL of the author field. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Url is not a well-formed System.Uri. |
Name
Gets or sets the author name.
Declaration
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The author name. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Author name length is longer than MaxAuthorNameLength. |
Url
Gets or sets the URL of the author field.
Declaration
public string Url { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The URL of the author field. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Url is not a well-formed System.Uri. |
Methods
| Improve this Doc View SourceBuild()
Builds the author field to be used.
Declaration
public EmbedAuthor Build()
Returns
| Type | Description |
|---|---|
| EmbedAuthor | The built author field. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Author name length is longer than MaxAuthorNameLength.
Url is not a well-formed System.Uri.
IconUrl is not a well-formed System.Uri. |
WithIconUrl(String)
Sets the icon URL of the author field.
Declaration
public EmbedAuthorBuilder WithIconUrl(string iconUrl)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | iconUrl | The icon URL of the author field. |
Returns
| Type | Description |
|---|---|
| EmbedAuthorBuilder | The current builder. |
WithName(String)
Sets the name of the author field.
Declaration
public EmbedAuthorBuilder WithName(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name of the author field. |
Returns
| Type | Description |
|---|---|
| EmbedAuthorBuilder | The current builder. |
WithUrl(String)
Sets the URL of the author field.
Declaration
public EmbedAuthorBuilder WithUrl(string url)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | url | The URL of the author field. |
Returns
| Type | Description |
|---|---|
| EmbedAuthorBuilder | The current builder. |