Table of Contents

Class Application

Namespace
NetCord
Assembly
NetCord.dll

Applications or 'apps', are containers for developer platform features, and can contain bots installable to guilds and/or user accounts.

public class Application : ClientEntity, IEntity, ISpanFormattable, IFormattable, IEquatable<Entity>, IJsonModel<JsonApplication>
Inheritance
Application
Implements
Derived
Inherited Members

Constructors

Application(JsonApplication, RestClient)

Constructs an Application using a JSON Model and RestClient.

public Application(JsonApplication jsonModel, RestClient client)

Parameters

jsonModel JsonApplication

The JSON model to create an Application from.

client RestClient

The RestClient to use for construction.

Properties

ApproximateGuildCount

The approximate number of guilds the application has been added to.

public int? ApproximateGuildCount { get; }

Property Value

int?

ApproximateUserInstallCount

The approximate number of users that have installed the application.

public int? ApproximateUserInstallCount { get; }

Property Value

int?

Bot

The partial User object of the application's bot.

public User? Bot { get; }

Property Value

User

BotPublic

When false, only the application owner can add the application to guilds.

public bool? BotPublic { get; }

Property Value

bool?

BotRequireCodeGrant

When true, the application's bot will only join upon completion of the full OAuth2 code grant flow.

public bool? BotRequireCodeGrant { get; }

Property Value

bool?

CoverImageHash

The cover image hash of the application's default rich presence invite.

public string? CoverImageHash { get; }

Property Value

string

CustomInstallUrl

The application's default custom install URL. Is null if disabled.

public string? CustomInstallUrl { get; }

Property Value

string

Description

The description of the application.

public string Description { get; }

Property Value

string

Flags

The application's public flags.

public ApplicationFlags? Flags { get; }

Property Value

ApplicationFlags?

Guild

The partial RestGuild object of the application's associated guild.

public RestGuild? Guild { get; }

Property Value

RestGuild

GuildId

The ID of the guild associated with the application. For example, a developer support server.

public ulong? GuildId { get; }

Property Value

ulong?

IconHash

The icon hash of the application.

public string? IconHash { get; }

Property Value

string

Id

The ID of the application.

public override ulong Id { get; }

Property Value

ulong

InstallParams

The application's default in-app authorization URL. Is null if disabled.

public ApplicationInstallParams? InstallParams { get; }

Property Value

ApplicationInstallParams

IntegrationTypesConfiguration

The default scopes and permissions for each supported installation context.

public IReadOnlyDictionary<ApplicationIntegrationType, ApplicationIntegrationTypeConfiguration>? IntegrationTypesConfiguration { get; }

Property Value

IReadOnlyDictionary<ApplicationIntegrationType, ApplicationIntegrationTypeConfiguration>

InteractionsEndpointUrl

The application's interactions endpoint URL.

public string? InteractionsEndpointUrl { get; }

Property Value

string

Name

The name of the application.

public string Name { get; }

Property Value

string

Owner

The partial User object of the application's owner.

public User? Owner { get; }

Property Value

User

PrimarySkuId

The ID of the Game SKU created, if one exists. Is null if the application is not a game sold on Discord.

public ulong? PrimarySkuId { get; }

Property Value

ulong?

PrivacyPolicyUrl

The application's Privacy Policy URL.

public string? PrivacyPolicyUrl { get; }

Property Value

string

RedirectUris

The application's redirect URI list.

public IReadOnlyList<string>? RedirectUris { get; }

Property Value

IReadOnlyList<string>

RoleConnectionsVerificationUrl

The application's role connection verification URL.

public string? RoleConnectionsVerificationUrl { get; }

Property Value

string

RpcOrigins

A list of the application's RPC origin URLs. null if RPC is disabled.

public IReadOnlyList<string> RpcOrigins { get; }

Property Value

IReadOnlyList<string>

Slug

The URL slug that links to an application's store page. Is null if the application is not a game sold on Discord.

public string? Slug { get; }

Property Value

string

Tags

The application's tag list, describing its content and functionality. Max of 5 tags.

public IReadOnlyList<string>? Tags { get; }

Property Value

IReadOnlyList<string>

Team

The team the application belongs to. Is null if the application does not belong to a team.

public Team? Team { get; }

Property Value

Team

TermsOfServiceUrl

The application's Terms of Service URL.

public string? TermsOfServiceUrl { get; }

Property Value

string

VerifyKey

The hex-encoded verification key used for HTTP interactions and the GameSDK's GetTicket.

public string VerifyKey { get; }

Property Value

string

Methods

CreateEmojiAsync(ApplicationEmojiProperties, RestRequestProperties?, CancellationToken)

public Task<ApplicationEmoji> CreateEmojiAsync(ApplicationEmojiProperties applicationEmojiProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationEmojiProperties ApplicationEmojiProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<ApplicationEmoji>

DeleteEmojiAsync(ulong, RestRequestProperties?, CancellationToken)

public Task DeleteEmojiAsync(ulong emojiId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

emojiId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

GetAchievementIconUrl(ulong, string, ImageFormat)

Gets the ImageUrl of an achievement associated with the application.

public ImageUrl? GetAchievementIconUrl(ulong achievementId, string iconHash, ImageFormat format)

Parameters

achievementId ulong

The ID of the achievement to get an ImageUrl for.

iconHash string

The hash of the achievement's icon.

format ImageFormat

The format of the returned ImageUrl.

Returns

ImageUrl

GetAssetUrl(ulong, ImageFormat)

Gets the ImageUrl of the an asset associated with the application.

public ImageUrl? GetAssetUrl(ulong assetId, ImageFormat format)

Parameters

assetId ulong

The ID of the asset to get an ImageUrl for.

format ImageFormat

The format of the returned ImageUrl.

Returns

ImageUrl

GetAsync(RestRequestProperties?, CancellationToken)

public virtual Task<Application> GetAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<Application>

GetCoverUrl(ImageFormat)

Gets the ImageUrl of the application's cover.

public ImageUrl? GetCoverUrl(ImageFormat format)

Parameters

format ImageFormat

The format of the returned ImageUrl.

Returns

ImageUrl

GetEmojiAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<ApplicationEmoji> GetEmojiAsync(ulong emojiId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

emojiId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<ApplicationEmoji>

GetEmojisAsync(RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<ApplicationEmoji>> GetEmojisAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<ApplicationEmoji>>

GetIconUrl(ImageFormat)

Gets the ImageUrl of the application's icon.

public ImageUrl? GetIconUrl(ImageFormat format)

Parameters

format ImageFormat

The format of the returned ImageUrl.

Returns

ImageUrl

GetStorePageAssetUrl(ulong, ImageFormat)

Gets the ImageUrl of a store page asset associated with the application.

public ImageUrl? GetStorePageAssetUrl(ulong assetId, ImageFormat format)

Parameters

assetId ulong

The ID of the asset to get an ImageUrl for.

format ImageFormat

The format of the returned ImageUrl.

Returns

ImageUrl

ModifyEmojiAsync(ulong, Action<ApplicationEmojiOptions>, RestRequestProperties?, CancellationToken)

public Task<ApplicationEmoji> ModifyEmojiAsync(ulong emojiId, Action<ApplicationEmojiOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

emojiId ulong
action Action<ApplicationEmojiOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<ApplicationEmoji>