Search Results for

    Show / Hide Table of Contents

    Class RestGuildCommand

    Represents a Rest-based guild application command.

    Inheritance
    Object
    RestEntity<UInt64>
    RestApplicationCommand
    RestGuildCommand
    Implements
    IEntity<UInt64>
    IApplicationCommand
    ISnowflakeEntity
    IEntity<UInt64>
    IDeletable
    Inherited Members
    RestApplicationCommand.ApplicationId
    RestApplicationCommand.Type
    RestApplicationCommand.Name
    RestApplicationCommand.Description
    RestApplicationCommand.IsDefaultPermission
    RestApplicationCommand.IsEnabledInDm
    RestApplicationCommand.DefaultMemberPermissions
    RestApplicationCommand.Options
    RestApplicationCommand.CreatedAt
    RestApplicationCommand.ModifyAsync(Action<ApplicationCommandProperties>, RequestOptions)
    RestEntity<UInt64>.Id
    Namespace: Discord.Rest
    Assembly: Discord.Net.Rest.dll
    Syntax
    public class RestGuildCommand : RestApplicationCommand, IEntity<ulong>, IApplicationCommand, ISnowflakeEntity, IEntity<ulong>, IDeletable

    Properties

    | Improve this Doc View Source

    GuildId

    Gets the guild Id where this command originates.

    Declaration
    public ulong GuildId { get; }
    Property Value
    Type Description
    UInt64

    Methods

    | Improve this Doc View Source

    DeleteAsync(RequestOptions)

    Declaration
    public override async Task DeleteAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options
    Returns
    Type Description
    Task
    Overrides
    RestApplicationCommand.DeleteAsync(RequestOptions)
    | Improve this Doc View Source

    GetCommandPermission(RequestOptions)

    Gets this commands permissions inside of the current guild.

    Declaration
    public Task<GuildApplicationCommandPermission> GetCommandPermission(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<GuildApplicationCommandPermission>

    A task that represents the asynchronous get operation. The task result contains a GuildApplicationCommandPermission object defining the permissions of the current slash command.

    | Improve this Doc View Source

    GetGuild(Boolean, RequestOptions)

    Gets the guild that this slash command resides in.

    Declaration
    public Task<RestGuild> GetGuild(bool withCounts = false, RequestOptions options = null)
    Parameters
    Type Name Description
    Boolean withCounts

    true if you want the approximate member and presence counts for the guild, otherwise false.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<RestGuild>

    A task that represents the asynchronous get operation. The task result contains a RestGuild.

    | Improve this Doc View Source

    ModifyAsync<TArg>(Action<TArg>, RequestOptions)

    Modifies this RestApplicationCommand.

    Declaration
    public override async Task ModifyAsync<TArg>(Action<TArg> func, RequestOptions options = null)
        where TArg : ApplicationCommandProperties
    Parameters
    Type Name Description
    Action<TArg> func

    The delegate containing the properties to modify the command with.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    The modified command

    Type Parameters
    Name Description
    TArg
    Overrides
    Discord.Rest.RestApplicationCommand.ModifyAsync<TArg>(Action<TArg>, Discord.RequestOptions)
    | Improve this Doc View Source

    ModifyCommandPermissions(ApplicationCommandPermission[], RequestOptions)

    Modifies the current command permissions for this guild command.

    Declaration
    public Task<GuildApplicationCommandPermission> ModifyCommandPermissions(ApplicationCommandPermission[] permissions, RequestOptions options = null)
    Parameters
    Type Name Description
    ApplicationCommandPermission[] permissions

    The permissions to overwrite.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<GuildApplicationCommandPermission>

    A task that represents the asynchronous modification operation. The task result contains a GuildApplicationCommandPermission object containing the modified permissions.

    Implements

    IEntity<TId>
    IApplicationCommand
    ISnowflakeEntity
    IEntity<TId>
    IDeletable

    Theme

    • Improve this Doc
    • View Source
    In This Article
    Back to top Discord.Net (c) 2015-2022 3.6.0