Table of Contents

Class EntryPointCommandBuilder

Namespace
NetCord.Services.ApplicationCommands
Assembly
NetCord.Services.dll

Entry point command serves as the primary way for users to open an app's Activity from the App Launcher. You can create only a single Entry Point command per app.

public class EntryPointCommandBuilder : ApplicationCommandBuilder
Inheritance
EntryPointCommandBuilder
Inherited Members

Constructors

EntryPointCommandBuilder(string, string)

Entry point command serves as the primary way for users to open an app's Activity from the App Launcher. You can create only a single Entry Point command per app.

public EntryPointCommandBuilder(string name, string description)

Parameters

name string
Name of the command (1-32 characters).
description string
Description of the command (1-100 characters).

Properties

Description

Description of the command (1-100 characters).

public string Description { get; }

Property Value

string

Handler

Handler that represents the body of the command.

public Delegate? Handler { get; set; }

Property Value

Delegate

Methods

AddContexts(params IEnumerable<InteractionContextType>)

Interaction context(s) where the command can be used.

public EntryPointCommandBuilder AddContexts(params IEnumerable<InteractionContextType> contexts)

Parameters

contexts IEnumerable<InteractionContextType>

Returns

EntryPointCommandBuilder

AddIntegrationTypes(params IEnumerable<ApplicationIntegrationType>)

Installation context(s) where the command is available.

public EntryPointCommandBuilder AddIntegrationTypes(params IEnumerable<ApplicationIntegrationType> integrationTypes)

Parameters

integrationTypes IEnumerable<ApplicationIntegrationType>

Returns

EntryPointCommandBuilder

WithContexts(IEnumerable<InteractionContextType>?)

Interaction context(s) where the command can be used.

public EntryPointCommandBuilder WithContexts(IEnumerable<InteractionContextType>? contexts)

Parameters

contexts IEnumerable<InteractionContextType>

Returns

EntryPointCommandBuilder

WithDefaultGuildPermissions(Permissions?)

Default required permissions to use the command.

public EntryPointCommandBuilder WithDefaultGuildPermissions(Permissions? defaultGuildPermissions)

Parameters

defaultGuildPermissions Permissions?

Returns

EntryPointCommandBuilder

WithHandler(Delegate?)

Handler that represents the body of the command.

public EntryPointCommandBuilder WithHandler(Delegate? handler)

Parameters

handler Delegate

Returns

EntryPointCommandBuilder

WithIntegrationTypes(IEnumerable<ApplicationIntegrationType>?)

Installation context(s) where the command is available.

public EntryPointCommandBuilder WithIntegrationTypes(IEnumerable<ApplicationIntegrationType>? integrationTypes)

Parameters

integrationTypes IEnumerable<ApplicationIntegrationType>

Returns

EntryPointCommandBuilder

WithNsfw(bool)

Indicates whether the command is age-restricted.

public EntryPointCommandBuilder WithNsfw(bool nsfw = true)

Parameters

nsfw bool

Returns

EntryPointCommandBuilder

WithRegister(bool)

Whether the application command should be registered by the service.

public EntryPointCommandBuilder WithRegister(bool register = true)

Parameters

register bool

Returns

EntryPointCommandBuilder