Class DiscordApplication
Represents an OAuth2 application.
Inherited Members
Namespace: DisCatSharp.Entities
Assembly: DisCatSharp.dll
Syntax
public sealed class DiscordApplication : DiscordMessageApplication, IEquatable<DiscordApplication>
Properties
| Improve this Doc View SourceCoverImageHash
Gets the hash of the application's cover image.
Declaration
public string CoverImageHash { get; }
Property Value
Type | Description |
---|---|
System.String |
CoverImageUrl
Gets this application's cover image URL.
Declaration
public override string CoverImageUrl { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
| Improve this Doc View SourceCustomInstallUrl
A custom url for the Add To Server button.
Declaration
public string CustomInstallUrl { get; }
Property Value
Type | Description |
---|---|
System.String |
Flags
Gets the application's flags.
Declaration
public ApplicationFlags Flags { get; }
Property Value
Type | Description |
---|---|
ApplicationFlags |
GuildId
If this application is a game sold on Discord, this field will be the guild to which it has been linked
Declaration
public ulong? GuildId { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.UInt64> |
Icon
Gets the application's icon.
Declaration
public override string Icon { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
| Improve this Doc View SourceIconHash
Gets the application's icon hash.
Declaration
public string IconHash { get; }
Property Value
Type | Description |
---|---|
System.String |
InstallParams
Install parameters for adding the application to a guild.
Declaration
public DiscordApplicationInstallParams InstallParams { get; }
Property Value
Type | Description |
---|---|
DiscordApplicationInstallParams |
IsHook
Whether the application is hooked.
Declaration
public bool IsHook { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsPublic
Gets whether this bot application is public.
Declaration
public bool? IsPublic { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
Owners
Gets the application's owners.
Declaration
public IEnumerable<DiscordUser> Owners { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<DiscordUser> |
PrimarySkuId
If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists
Declaration
public ulong? PrimarySkuId { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.UInt64> |
PrivacyPolicyUrl
Gets the privacy policy url of the application.
Declaration
public string PrivacyPolicyUrl { get; }
Property Value
Type | Description |
---|---|
System.String |
RequiresCodeGrant
Gets whether this application's bot user requires code grant.
Declaration
public bool? RequiresCodeGrant { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
RpcOrigins
Gets the application's allowed RPC origins.
Declaration
public IReadOnlyList<string> RpcOrigins { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.String> |
Slug
If this application is a game sold on Discord, this field will be the URL slug that links to the store page
Declaration
public string Slug { get; }
Property Value
Type | Description |
---|---|
System.String |
Summary
Gets the application's summary.
Declaration
public string Summary { get; }
Property Value
Type | Description |
---|---|
System.String |
Tags
The application tags. Not used atm.
Declaration
public IReadOnlyList<string> Tags { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.String> |
Team
Gets the team which owns this application.
Declaration
public DiscordTeam Team { get; }
Property Value
Type | Description |
---|---|
DiscordTeam |
TeamName
Gets the team name of the application.
Declaration
public string TeamName { get; }
Property Value
Type | Description |
---|---|
System.String |
TermsOfServiceUrl
Gets the terms of service url of the application.
Declaration
public string TermsOfServiceUrl { get; }
Property Value
Type | Description |
---|---|
System.String |
Type
Gets the application type. Mostly null.
Declaration
public string Type { get; }
Property Value
Type | Description |
---|---|
System.String |
VerifyKey
Gets the hex encoded key for verification in interactions and the GameSDK's GetTicket
Declaration
public string VerifyKey { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceEquals(DiscordApplication)
Checks whether this DiscordApplication is equal to another DiscordApplication.
Declaration
public bool Equals(DiscordApplication e)
Parameters
Type | Name | Description |
---|---|---|
DiscordApplication | e | DiscordApplication to compare to. |
Returns
Type | Description |
---|---|
System.Boolean | Whether the DiscordApplication is equal to this DiscordApplication. |
Equals(Object)
Checks whether this DiscordApplication is equal to another object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | Object to compare to. |
Returns
Type | Description |
---|---|
System.Boolean | Whether the object is equal to this DiscordApplication. |
Overrides
GenerateBotOAuth(Permissions)
Generates an oauth url for the application.
Declaration
public string GenerateBotOAuth(Permissions permissions = Permissions.None)
Parameters
Type | Name | Description |
---|---|---|
Permissions | permissions | The permissions. |
Returns
Type | Description |
---|---|
System.String | OAuth Url |
GetAssetsAsync()
Retrieves this application's assets.
Declaration
public async Task<IReadOnlyList<DiscordApplicationAsset>> GetAssetsAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<DiscordApplicationAsset>> | This application's assets. |
GetAvatarUrl(ImageFormat, UInt16)
Gets the application's cover image URL, in requested format and size.
Declaration
public string GetAvatarUrl(ImageFormat fmt, ushort size = 1024)
Parameters
Type | Name | Description |
---|---|---|
ImageFormat | fmt | Format of the image to get. |
System.UInt16 | size | Maximum size of the cover image. Must be a power of two, minimum 16, maximum 2048. |
Returns
Type | Description |
---|---|
System.String | URL of the application's cover image. |
GetHashCode()
Gets the hash code for this DiscordApplication.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | The hash code for this DiscordApplication. |
Overrides
Operators
| Improve this Doc View SourceEquality(DiscordApplication, DiscordApplication)
Gets whether the two DiscordApplication objects are equal.
Declaration
public static bool operator ==(DiscordApplication e1, DiscordApplication e2)
Parameters
Type | Name | Description |
---|---|---|
DiscordApplication | e1 | First application to compare. |
DiscordApplication | e2 | Second application to compare. |
Returns
Type | Description |
---|---|
System.Boolean | Whether the two applications are equal. |
Inequality(DiscordApplication, DiscordApplication)
Gets whether the two DiscordApplication objects are not equal.
Declaration
public static bool operator !=(DiscordApplication e1, DiscordApplication e2)
Parameters
Type | Name | Description |
---|---|---|
DiscordApplication | e1 | First application to compare. |
DiscordApplication | e2 | Second application to compare. |
Returns
Type | Description |
---|---|
System.Boolean | Whether the two applications are not equal. |