Search Results for

    Show / Hide Table of Contents

    Interface IDiscordRestApplication

    Contains all the API calls mentioned in the Application object documentation. Docs: https://discord.com/developers/docs/resources/application

    Namespace: Color_Chan.Discord.Core.Common.API.Rest
    Assembly: Color-Chan.Discord.Core.dll
    Syntax
    public interface IDiscordRestApplication

    Methods

    | Improve this Doc View Source

    BulkOverwriteGlobalApplicationCommandsAsync(UInt64, IEnumerable<DiscordCreateApplicationCommand>, CancellationToken)

    Overwrites existing application commands that are registered globally for the application. Updates will be available in all guilds after 1 hour.

    Declaration
    Task<Result<IReadOnlyList<IDiscordApplicationCommand>>> BulkOverwriteGlobalApplicationCommandsAsync(ulong applicationId, IEnumerable<DiscordCreateApplicationCommand> commandParams, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 applicationId

    The id of the application.

    System.Collections.Generic.IEnumerable<DiscordCreateApplicationCommand> commandParams

    A System.Collections.Generic.IEnumerable<T> of DiscordCreateApplicationCommand containing the new application command details.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result<System.Collections.Generic.IReadOnlyList<IDiscordApplicationCommand>>>

    The Result<T> of System.Collections.Generic.IReadOnlyList<T> of IDiscordApplicationCommand with the request results.

    | Improve this Doc View Source

    BulkOverwriteGuildApplicationCommandsAsync(UInt64, UInt64, IEnumerable<DiscordCreateApplicationCommand>, CancellationToken)

    Overwrites existing commands for a guild. Updates for guild commands will be available immediately.

    Declaration
    Task<Result<IReadOnlyList<IDiscordApplicationCommand>>> BulkOverwriteGuildApplicationCommandsAsync(ulong applicationId, ulong guildId, IEnumerable<DiscordCreateApplicationCommand> commandParams, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 applicationId

    The id of the application.

    System.UInt64 guildId

    The guild id.

    System.Collections.Generic.IEnumerable<DiscordCreateApplicationCommand> commandParams

    A System.Collections.Generic.IEnumerable<T> of DiscordCreateApplicationCommand containing the new guild application command details.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result<System.Collections.Generic.IReadOnlyList<IDiscordApplicationCommand>>>

    The Result<T> of System.Collections.Generic.IReadOnlyList<T> of IDiscordApplicationCommand with the request results.

    | Improve this Doc View Source

    CreateFollowupMessageAsync(UInt64, String, DiscordCreateFollowupMessage, CancellationToken)

    Create a followup message for an Interaction.

    Declaration
    Task<Result<IDiscordMessage>> CreateFollowupMessageAsync(ulong applicationId, string token, DiscordCreateFollowupMessage followupMessage, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 applicationId

    The ID of the application.

    System.String token

    The token of the interaction.

    DiscordCreateFollowupMessage followupMessage

    The follow up message of the interaction.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result<IDiscordMessage>>

    The Result<T> of IDiscordMessage with the request results.

    | Improve this Doc View Source

    CreateGlobalApplicationCommandAsync(UInt64, DiscordCreateApplicationCommand, CancellationToken)

    Create a new global application command. New global application commands will be available in all guilds after 1 hour.

    Declaration
    Task<Result<IDiscordApplicationCommand>> CreateGlobalApplicationCommandAsync(ulong applicationId, DiscordCreateApplicationCommand command, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 applicationId

    The id of the application.

    DiscordCreateApplicationCommand command

    The DiscordCreateApplicationCommand containing the application command details.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result<IDiscordApplicationCommand>>

    The Result<T> of IDiscordApplicationCommand with the request results.

    Remarks

    Creating a command with the same name as an existing command for your application will overwrite the old command.

    | Improve this Doc View Source

    CreateGuildApplicationCommandAsync(UInt64, UInt64, DiscordCreateApplicationCommand, CancellationToken)

    Create a new guild application command. New guild application commands will be available in the guild immediately.

    Declaration
    Task<Result<IDiscordApplicationCommand>> CreateGuildApplicationCommandAsync(ulong applicationId, ulong guildId, DiscordCreateApplicationCommand command, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 applicationId

    The id of the application.

    System.UInt64 guildId

    The guild id.

    DiscordCreateApplicationCommand command

    The DiscordCreateApplicationCommand containing the application command details.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result<IDiscordApplicationCommand>>

    The Result<T> of IDiscordApplicationCommand with the request results.

    | Improve this Doc View Source

    CreateInteractionResponseAsync(UInt64, String, DiscordInteractionResponseData, CancellationToken)

    Create a response to an Interaction from the gateway.

    Declaration
    Task<Result> CreateInteractionResponseAsync(ulong interactionId, string token, DiscordInteractionResponseData response, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 interactionId

    The interaction id.

    System.String token

    The token of the interaction.

    DiscordInteractionResponseData response

    The new response.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result>

    The Result with the request results.

    | Improve this Doc View Source

    CreateTestEntitlementAsync(UInt64, DiscordCreateTestEntitlement, CancellationToken)

    Create a new test entitlement for a user or guild.

    Declaration
    Task<Result<IDiscordEntitlement>> CreateTestEntitlementAsync(ulong applicationId, DiscordCreateTestEntitlement entitlement, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 applicationId

    The id of the application where the entitlement will belong to.

    DiscordCreateTestEntitlement entitlement

    The DiscordCreateTestEntitlement containing all the request params.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result<IDiscordEntitlement>>

    The Result<T> of IDiscordEntitlement with the request results.

    | Improve this Doc View Source

    DeleteFollowupMessageAsync(UInt64, String, UInt64, CancellationToken)

    Deletes a followup message for an Interaction.

    Declaration
    Task<Result> DeleteFollowupMessageAsync(ulong applicationId, string token, ulong messageId, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 applicationId

    The ID of the application.

    System.String token

    The token of the interaction.

    System.UInt64 messageId

    The ID of the followup message.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result>

    The Result with the request results.

    Remarks

    Does not support ephemeral followups.

    | Improve this Doc View Source

    DeleteGlobalApplicationCommandAsync(UInt64, UInt64, CancellationToken)

    Deletes a global application command.

    Declaration
    Task<Result> DeleteGlobalApplicationCommandAsync(ulong applicationId, ulong commandId, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 applicationId

    The id of the application.

    System.UInt64 commandId

    The id of the application command.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result>

    The Result with the request results.

    | Improve this Doc View Source

    DeleteGuildApplicationCommandAsync(UInt64, UInt64, UInt64, CancellationToken)

    Delete a guild application command.

    Declaration
    Task<Result> DeleteGuildApplicationCommandAsync(ulong applicationId, ulong guildId, ulong commandId, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 applicationId

    The id of the application.

    System.UInt64 guildId

    The guild id.

    System.UInt64 commandId

    The id of the application command.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result>

    The Result with the request results.

    | Improve this Doc View Source

    DeleteOriginalInteractionResponseAsync(UInt64, String, CancellationToken)

    Deletes the initial Interaction response.

    Declaration
    Task<Result> DeleteOriginalInteractionResponseAsync(ulong applicationId, string token, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 applicationId

    The ID of the application.

    System.String token

    The token of the interaction.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result>

    The Result with the request results.

    | Improve this Doc View Source

    DeleteTestEntitlementAsync(UInt64, UInt64, CancellationToken)

    Delete a test entitlement for a user or guild.

    Declaration
    Task<Result> DeleteTestEntitlementAsync(ulong applicationId, ulong entitlementId, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 applicationId

    The id of the application where the entitlement belongs to.

    System.UInt64 entitlementId

    The id of the entitlement.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result>

    The Result with the request results.

    | Improve this Doc View Source

    EditFollowupMessageAsync(UInt64, String, UInt64, DiscordEditWebhookMessage, CancellationToken)

    Edits a followup message for an Interaction.

    Declaration
    Task<Result<IDiscordMessage>> EditFollowupMessageAsync(ulong applicationId, string token, ulong messageId, DiscordEditWebhookMessage webhookMessage, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 applicationId

    The ID of the application.

    System.String token

    The token of the interaction.

    System.UInt64 messageId

    The ID of the followup message.

    DiscordEditWebhookMessage webhookMessage

    The edited followup message.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result<IDiscordMessage>>

    The Result<T> of IDiscordMessage with the request results.

    Remarks

    Does not support ephemeral followups.

    | Improve this Doc View Source

    EditGlobalApplicationCommandAsync(UInt64, UInt64, DiscordCreateApplicationCommand, CancellationToken)

    Edit a global application command. Updates will be available in all guilds after 1 hour.

    Declaration
    Task<Result<IDiscordApplicationCommand>> EditGlobalApplicationCommandAsync(ulong applicationId, ulong commandId, DiscordCreateApplicationCommand command, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 applicationId

    The id of the application.

    System.UInt64 commandId

    The id of the application command.

    DiscordCreateApplicationCommand command

    The DiscordCreateApplicationCommand containing the new application command details.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result<IDiscordApplicationCommand>>

    The Result<T> of IDiscordApplicationCommand with the request results.

    | Improve this Doc View Source

    EditGuildApplicationCommandAsync(UInt64, UInt64, UInt64, DiscordCreateApplicationCommand, CancellationToken)

    Edit a guild application command. Updates for guild commands will be available immediately.

    Declaration
    Task<Result<IDiscordApplicationCommand>> EditGuildApplicationCommandAsync(ulong applicationId, ulong guildId, ulong commandId, DiscordCreateApplicationCommand command, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 applicationId

    The id of the application.

    System.UInt64 guildId

    The guild id.

    System.UInt64 commandId

    The id of the application command.

    DiscordCreateApplicationCommand command

    The DiscordCreateApplicationCommand containing the new application command details.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result<IDiscordApplicationCommand>>

    The Result<T> of IDiscordApplicationCommand with the request results.

    | Improve this Doc View Source

    EditOriginalInteractionResponseAsync(UInt64, String, DiscordEditWebhookMessage, CancellationToken)

    Edits the initial Interaction response.

    Declaration
    Task<Result<IDiscordMessage>> EditOriginalInteractionResponseAsync(ulong applicationId, string token, DiscordEditWebhookMessage webhookMessage, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 applicationId

    The ID of the application.

    System.String token

    The token of the interaction.

    DiscordEditWebhookMessage webhookMessage

    The new message.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result<IDiscordMessage>>

    The Result<T> of IDiscordMessage with the request results.

    | Improve this Doc View Source

    GetEntitlementsAsync(UInt64, CancellationToken)

    Get the entitlements for an application.

    Declaration
    Task<Result<IReadOnlyList<IDiscordEntitlement>>> GetEntitlementsAsync(ulong applicationId, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 applicationId

    The id of the application where the entitlement belongs to.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result<System.Collections.Generic.IReadOnlyList<IDiscordEntitlement>>>

    The Result<T> of System.Collections.Generic.IReadOnlyList<T> of IDiscordEntitlement with the request results.

    | Improve this Doc View Source

    GetFollowupMessageAsync(UInt64, String, UInt64, CancellationToken)

    Returns a followup message for an Interaction.

    Declaration
    Task<Result<IDiscordMessage>> GetFollowupMessageAsync(ulong applicationId, string token, ulong messageId, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 applicationId

    The ID of the application.

    System.String token

    The token of the interaction.

    System.UInt64 messageId

    The ID of the followup message.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result<IDiscordMessage>>

    The Result<T> of IDiscordMessage with the request results.

    Remarks

    Does not support ephemeral followups.

    | Improve this Doc View Source

    GetGlobalApplicationCommandAsync(UInt64, UInt64, CancellationToken)

    Fetch a global application command for your application..

    Declaration
    Task<Result<IDiscordApplicationCommand>> GetGlobalApplicationCommandAsync(ulong applicationId, ulong commandId, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 applicationId

    The id of the application.

    System.UInt64 commandId

    The id of the application command.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result<IDiscordApplicationCommand>>

    The Result<T> of IDiscordApplicationCommand with the request results.

    | Improve this Doc View Source

    GetGlobalApplicationCommandsAsync(UInt64, CancellationToken)

    Fetch all of the global application commands for your application.

    Declaration
    Task<Result<IReadOnlyList<IDiscordApplicationCommand>>> GetGlobalApplicationCommandsAsync(ulong applicationId, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 applicationId

    The id of the application.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result<System.Collections.Generic.IReadOnlyList<IDiscordApplicationCommand>>>

    The Result<T> of System.Collections.Generic.IReadOnlyList<T> of IDiscordApplicationCommand with the request results.

    | Improve this Doc View Source

    GetGuildApplicationCommandAsync(UInt64, UInt64, UInt64, CancellationToken)

    Fetch a guild application command for your application.

    Declaration
    Task<Result<IDiscordApplicationCommand>> GetGuildApplicationCommandAsync(ulong applicationId, ulong guildId, ulong commandId, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 applicationId

    The id of the application.

    System.UInt64 guildId

    The guild id.

    System.UInt64 commandId

    The id of the application command.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result<IDiscordApplicationCommand>>

    The Result<T> of IDiscordApplicationCommand with the request results.

    | Improve this Doc View Source

    GetGuildApplicationCommandPermissionsAsync(UInt64, UInt64, CancellationToken)

    Fetches command permissions for all commands for your application in a guild.

    Declaration
    Task<Result<IReadOnlyList<IDiscordGuildApplicationCommandPermissions>>> GetGuildApplicationCommandPermissionsAsync(ulong applicationId, ulong guildId, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 applicationId

    The id of the application.

    System.UInt64 guildId

    The id of the guild.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result<System.Collections.Generic.IReadOnlyList<IDiscordGuildApplicationCommandPermissions>>>

    The Result<T> of System.Collections.Generic.IReadOnlyList<T> of IDiscordGuildApplicationCommandPermissions with the request results.

    | Improve this Doc View Source

    GetGuildApplicationCommandPermissionsAsync(UInt64, UInt64, UInt64, CancellationToken)

    Fetches command permissions for a command for your application in a guild.

    Declaration
    Task<Result<IReadOnlyList<IDiscordGuildApplicationCommandPermissions>>> GetGuildApplicationCommandPermissionsAsync(ulong applicationId, ulong guildId, ulong commandId, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 applicationId

    The id of the application.

    System.UInt64 guildId

    The id of the guild.

    System.UInt64 commandId

    The id of the command.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result<System.Collections.Generic.IReadOnlyList<IDiscordGuildApplicationCommandPermissions>>>

    The Result<T> of System.Collections.Generic.IReadOnlyList<T> of IDiscordGuildApplicationCommandPermissions with the request results.

    | Improve this Doc View Source

    GetGuildApplicationCommandsAsync(UInt64, UInt64, CancellationToken)

    Fetch all of the guild application commands for the application for a specific guild..

    Declaration
    Task<Result<IReadOnlyList<IDiscordApplicationCommand>>> GetGuildApplicationCommandsAsync(ulong applicationId, ulong guildId, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 applicationId

    The id of the application.

    System.UInt64 guildId

    The guild id.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result<System.Collections.Generic.IReadOnlyList<IDiscordApplicationCommand>>>

    The Result<T> of System.Collections.Generic.IReadOnlyList<T> of IDiscordApplicationCommand with the request results.

    | Improve this Doc View Source

    GetOriginalInteractionResponseAsync(UInt64, String, CancellationToken)

    Returns the initial Interaction response.

    Declaration
    Task<Result<IDiscordMessage>> GetOriginalInteractionResponseAsync(ulong applicationId, string token, CancellationToken ct = default(CancellationToken))
    Parameters
    Type Name Description
    System.UInt64 applicationId

    The ID of the application.

    System.String token

    The token of the interaction.

    System.Threading.CancellationToken ct

    The System.Threading.CancellationToken.

    Returns
    Type Description
    System.Threading.Tasks.Task<Result<IDiscordMessage>>

    The Result<T> of IDiscordMessage with the request results.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX