Table of Contents

Class MessageCommandProperties

Namespace
NetCord.Rest
Assembly
NetCord.dll

Message commands are application commands that appear on the context menu (right click or tap) of messages. They are a great way to surface quick actions for your app that target messages.

public class MessageCommandProperties : ApplicationCommandProperties, IJsonSerializable<ApplicationCommandProperties>
Inheritance
MessageCommandProperties
Implements
Inherited Members

Constructors

MessageCommandProperties(string)

Message commands are application commands that appear on the context menu (right click or tap) of messages. They are a great way to surface quick actions for your app that target messages.

public MessageCommandProperties(string name)

Parameters

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

Methods

AddContexts(params IEnumerable<InteractionContextType>)

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

public MessageCommandProperties AddContexts(params IEnumerable<InteractionContextType> contexts)

Parameters

contexts IEnumerable<InteractionContextType>

Returns

MessageCommandProperties

AddIntegrationTypes(params IEnumerable<ApplicationIntegrationType>)

Installation context(s) where the command is available.

public MessageCommandProperties AddIntegrationTypes(params IEnumerable<ApplicationIntegrationType> integrationTypes)

Parameters

integrationTypes IEnumerable<ApplicationIntegrationType>

Returns

MessageCommandProperties

WithContexts(IEnumerable<InteractionContextType>?)

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

public MessageCommandProperties WithContexts(IEnumerable<InteractionContextType>? contexts)

Parameters

contexts IEnumerable<InteractionContextType>

Returns

MessageCommandProperties

WithDefaultGuildPermissions(Permissions?)

Default required permissions to use the command.

public MessageCommandProperties WithDefaultGuildPermissions(Permissions? defaultGuildPermissions)

Parameters

defaultGuildPermissions Permissions?

Returns

MessageCommandProperties

WithIntegrationTypes(IEnumerable<ApplicationIntegrationType>?)

Installation context(s) where the command is available.

public MessageCommandProperties WithIntegrationTypes(IEnumerable<ApplicationIntegrationType>? integrationTypes)

Parameters

integrationTypes IEnumerable<ApplicationIntegrationType>

Returns

MessageCommandProperties

WithName(string)

Name of the command (1-32 characters).

public MessageCommandProperties WithName(string name)

Parameters

name string

Returns

MessageCommandProperties

WithNameLocalizations(IReadOnlyDictionary<string, string>?)

Localizations of Name (1-32 characters each).

public MessageCommandProperties WithNameLocalizations(IReadOnlyDictionary<string, string>? nameLocalizations)

Parameters

nameLocalizations IReadOnlyDictionary<string, string>

Returns

MessageCommandProperties

WithNsfw(bool)

Indicates whether the command is age-restricted.

public MessageCommandProperties WithNsfw(bool nsfw = true)

Parameters

nsfw bool

Returns

MessageCommandProperties