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
JsonApplicationThe JSON model to create an Application from.
client
RestClientThe 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
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
CustomInstallUrl
The application's default custom install URL. Is null if disabled.
public string? CustomInstallUrl { get; }
Property Value
Description
The description of the application.
public string Description { get; }
Property Value
Flags
The application's public flags.
public ApplicationFlags? Flags { get; }
Property Value
Guild
The partial RestGuild object of the application's associated guild.
public RestGuild? Guild { get; }
Property Value
GuildId
The ID of the guild associated with the application. For example, a developer support server.
public ulong? GuildId { get; }
Property Value
IconHash
The icon hash of the application.
public string? IconHash { get; }
Property Value
Id
The ID of the application.
public override ulong Id { get; }
Property Value
InstallParams
The application's default in-app authorization URL. Is null if disabled.
public ApplicationInstallParams? InstallParams { get; }
Property Value
IntegrationTypesConfiguration
The default scopes and permissions for each supported installation context.
public IReadOnlyDictionary<ApplicationIntegrationType, ApplicationIntegrationTypeConfiguration>? IntegrationTypesConfiguration { get; }
Property Value
InteractionsEndpointUrl
The application's interactions endpoint URL.
public string? InteractionsEndpointUrl { get; }
Property Value
Name
The name of the application.
public string Name { get; }
Property Value
Owner
The partial User object of the application's owner.
public User? Owner { get; }
Property Value
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
PrivacyPolicyUrl
The application's Privacy Policy URL.
public string? PrivacyPolicyUrl { get; }
Property Value
RedirectUris
The application's redirect URI list.
public IReadOnlyList<string>? RedirectUris { get; }
Property Value
RoleConnectionsVerificationUrl
The application's role connection verification URL.
public string? RoleConnectionsVerificationUrl { get; }
Property Value
RpcOrigins
A list of the application's RPC origin URLs. null if RPC is disabled.
public IReadOnlyList<string> RpcOrigins { get; }
Property Value
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
Tags
The application's tag list, describing its content and functionality. Max of 5 tags.
public IReadOnlyList<string>? Tags { get; }
Property Value
Team
The team the application belongs to. Is null if the application does not belong to a team.
public Team? Team { get; }
Property Value
TermsOfServiceUrl
The application's Terms of Service URL.
public string? TermsOfServiceUrl { get; }
Property Value
VerifyKey
The hex-encoded verification key used for HTTP interactions and the GameSDK's GetTicket.
public string VerifyKey { get; }
Property Value
Methods
CreateEmojiAsync(ApplicationEmojiProperties, RestRequestProperties?, CancellationToken)
public Task<ApplicationEmoji> CreateEmojiAsync(ApplicationEmojiProperties applicationEmojiProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
applicationEmojiProperties
ApplicationEmojiPropertiesproperties
RestRequestPropertiescancellationToken
CancellationToken
Returns
DeleteEmojiAsync(ulong, RestRequestProperties?, CancellationToken)
public Task DeleteEmojiAsync(ulong emojiId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
emojiId
ulongproperties
RestRequestPropertiescancellationToken
CancellationToken
Returns
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
ulongThe ID of the achievement to get an ImageUrl for.
iconHash
stringThe hash of the achievement's icon.
format
ImageFormatThe format of the returned ImageUrl.
Returns
GetAssetUrl(ulong, ImageFormat)
Gets the ImageUrl of the an asset associated with the application.
public ImageUrl? GetAssetUrl(ulong assetId, ImageFormat format)
Parameters
assetId
ulongThe ID of the asset to get an ImageUrl for.
format
ImageFormatThe format of the returned ImageUrl.
Returns
GetAsync(RestRequestProperties?, CancellationToken)
public virtual Task<Application> GetAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
properties
RestRequestPropertiescancellationToken
CancellationToken
Returns
GetCoverUrl(ImageFormat)
Gets the ImageUrl of the application's cover.
public ImageUrl? GetCoverUrl(ImageFormat format)
Parameters
format
ImageFormatThe format of the returned ImageUrl.
Returns
GetEmojiAsync(ulong, RestRequestProperties?, CancellationToken)
public Task<ApplicationEmoji> GetEmojiAsync(ulong emojiId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
emojiId
ulongproperties
RestRequestPropertiescancellationToken
CancellationToken
Returns
GetEmojisAsync(RestRequestProperties?, CancellationToken)
public Task<IReadOnlyList<ApplicationEmoji>> GetEmojisAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
properties
RestRequestPropertiescancellationToken
CancellationToken
Returns
GetIconUrl(ImageFormat)
Gets the ImageUrl of the application's icon.
public ImageUrl? GetIconUrl(ImageFormat format)
Parameters
format
ImageFormatThe format of the returned ImageUrl.
Returns
GetStorePageAssetUrl(ulong, ImageFormat)
Gets the ImageUrl of a store page asset associated with the application.
public ImageUrl? GetStorePageAssetUrl(ulong assetId, ImageFormat format)
Parameters
assetId
ulongThe ID of the asset to get an ImageUrl for.
format
ImageFormatThe format of the returned ImageUrl.
Returns
ModifyEmojiAsync(ulong, Action<ApplicationEmojiOptions>, RestRequestProperties?, CancellationToken)
public Task<ApplicationEmoji> ModifyEmojiAsync(ulong emojiId, Action<ApplicationEmojiOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
emojiId
ulongaction
Action<ApplicationEmojiOptions>properties
RestRequestPropertiescancellationToken
CancellationToken