Table of Contents

Class EnabledInDmAttribute

Namespace
Discord.Interactions
Assembly
Discord.Net.Interactions.dll

Sets the IsEnabledInDm property of an application command or module.

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
[Obsolete("This attribute will be deprecated soon. Configure with CommandContextTypes attribute instead.")]
public class EnabledInDmAttribute : Attribute
Inheritance
EnabledInDmAttribute
Inherited Members

Constructors

EnabledInDmAttribute(bool)

Sets the IsEnabledInDm property of an application command or module.

public EnabledInDmAttribute(bool isEnabled)

Parameters

isEnabled bool

Whether or not this command can be used in DMs.

Properties

IsEnabled

Gets whether or not this command can be used in DMs.

public bool IsEnabled { get; }

Property Value

bool