Class DiscordUri
An URI in a Discord embed doesn't necessarily conform to the RFC 3986. If it uses the attachment://
protocol, it mustn't contain a trailing slash to be interpreted correctly as an embed attachment reference by
Discord.
Inheritance
System.Object
DiscordUri
Namespace: DisCatSharp.Net
Assembly: DisCatSharp.dll
Syntax
public class DiscordUri
Properties
| Improve this Doc View SourceType
The type of this URI.
Declaration
public DiscordUriType Type { get; }
Property Value
Type | Description |
---|---|
DiscordUriType |
Methods
| Improve this Doc View SourceToString()
Returns a string representation of this DiscordUri.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | This DiscordUri, as a string. |
Overrides
System.Object.ToString()
|
Improve this Doc
View Source
ToUri()
Converts this DiscordUri into a canonical representation of a System.Uri if it can be represented as such, throwing an exception otherwise.
Declaration
public Uri ToUri()
Returns
Type | Description |
---|---|
System.Uri | A canonical representation of this DiscordUri. |
Exceptions
Type | Condition |
---|---|
System.UriFormatException | If System.Type is not Standard, as that would mean creating an invalid Uri, which would result in loss of data. |