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 application's user object, representing its bot.

public User? Bot { get; }

Property Value

User

BotPublic

Whether users other than the owner can add the application to guilds.

public bool? BotPublic { get; }

Property Value

bool?

BotRequireCodeGrant

Whether 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 for the application's default rich presence invite.

public string? CoverImageHash { get; }

Property Value

string

CustomInstallUrl

The application's default custom install URL if enabled, otherwise null.

public string? CustomInstallUrl { get; }

Property Value

string

Description

The application's description.

public string Description { get; }

Property Value

string

EventWebhooksStatus

The application's configuration for webhook events.

public ApplicationEventWebhooksStatus EventWebhooksStatus { get; }

Property Value

ApplicationEventWebhooksStatus

EventWebhooksTypes

A list of event webhook types that the application supports.

public IReadOnlyList<string>? EventWebhooksTypes { get; }

Property Value

IReadOnlyList<string>

EventWebhooksUrl

The application's event webhooks URL to receive webhook events.

public string? EventWebhooksUrl { get; }

Property Value

string

Flags

The application's public flags.

public ApplicationFlags? Flags { get; }

Property Value

ApplicationFlags?

Guild

The application guild's object.

public RestGuild? Guild { get; }

Property Value

RestGuild

GuildId

The ID corresponding to the application's guild.

public ulong? GuildId { get; }

Property Value

ulong?

IconHash

The application's icon hash.

public string? IconHash { get; }

Property Value

string

Id

The application's ID..

public override ulong Id { get; }

Property Value

ulong

InstallParams

The application's default in-application authorization URL if enabled, otherwise null.

public ApplicationInstallParams? InstallParams { get; }

Property Value

ApplicationInstallParams

IntegrationTypesConfiguration

A list of the application's 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 application's name.

public string Name { get; }

Property Value

string

Owner

The application owner's user object.

public User? Owner { get; }

Property Value

User

PrimarySkuId

The ID of the application's Game SKU if it exists, otherwise null.

public ulong? PrimarySkuId { get; }

Property Value

ulong?

PrivacyPolicyUrl

The application's Privacy Policy URL.

public string? PrivacyPolicyUrl { get; }

Property Value

string

RedirectUris

A list of the application's redirect URIs.

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 if enabled, otherwise null.

public IReadOnlyList<string> RpcOrigins { get; }

Property Value

IReadOnlyList<string>

Slug

The URL slug that links to an application's store page if it exists, otherwise null.

public string? Slug { get; }

Property Value

string

Tags

A list of the application's tags, describing its content and functionality.

public IReadOnlyList<string>? Tags { get; }

Property Value

IReadOnlyList<string>

Remarks

A maximum of 5 tags is supported.

Team

The team the application belongs to, if any.

public Team? Team { get; }

Property Value

Team

TermsOfServiceUrl

The application's Terms of Service URL.

public string? TermsOfServiceUrl { get; }

Property Value

string

VerifyKey

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

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>