Table of Contents

Class MessageCommandProperties

Namespace
NetCord.Rest
Assembly
NetCord.dll
public class MessageCommandProperties : ApplicationCommandProperties
Inheritance
MessageCommandProperties
Inherited Members

Constructors

MessageCommandProperties(string)

public MessageCommandProperties(string name)

Parameters

name string

Name of the command (1-32 characters).

Methods

AddContexts(params InteractionContextType[])

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

public MessageCommandProperties AddContexts(params InteractionContextType[] contexts)

Parameters

contexts InteractionContextType[]

Returns

MessageCommandProperties

AddContexts(IEnumerable<InteractionContextType>)

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

public MessageCommandProperties AddContexts(IEnumerable<InteractionContextType> contexts)

Parameters

contexts IEnumerable<InteractionContextType>

Returns

MessageCommandProperties

AddIntegrationTypes(params ApplicationIntegrationType[])

Installation context(s) where the command is available.

public MessageCommandProperties AddIntegrationTypes(params ApplicationIntegrationType[] integrationTypes)

Parameters

integrationTypes ApplicationIntegrationType[]

Returns

MessageCommandProperties

AddIntegrationTypes(IEnumerable<ApplicationIntegrationType>)

Installation context(s) where the command is available.

public MessageCommandProperties AddIntegrationTypes(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

WithDMPermission(bool?)

Indicates whether the command is available in DMs with the app.

[Obsolete("Replaced by 'Contexts'.")]
public MessageCommandProperties WithDMPermission(bool? dMPermission = true)

Parameters

dMPermission bool?

Returns

MessageCommandProperties

WithDefaultGuildUserPermissions(Permissions?)

Default required permissions to use the command.

public MessageCommandProperties WithDefaultGuildUserPermissions(Permissions? defaultGuildUserPermissions)

Parameters

defaultGuildUserPermissions Permissions?

Returns

MessageCommandProperties

WithDefaultPermission(bool?)

Indicates whether the command is enabled by default when the app is added to a guild.

[Obsolete("Replaced by 'DefaultGuildUserPermissions'.")]
public MessageCommandProperties WithDefaultPermission(bool? defaultPermission = true)

Parameters

defaultPermission bool?

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