Class CommandContextTypeAttribute
- Namespace
- HeyBox.Interactions
- Assembly
- HeyBox.Net.Interactions.dll
指定此命令可在哪些上下文类型中执行。
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public class CommandContextTypeAttribute : Attribute
- Inheritance
-
CommandContextTypeAttribute
- Inherited Members
Constructors
CommandContextTypeAttribute(params InteractionContextType[])
设置应用命令或模块的 ContextTypes 属性。
public CommandContextTypeAttribute(params InteractionContextType[] contextTypes)
Parameters
contextTypes
InteractionContextType[]为命令设置的上下文类型。
Properties
ContextTypes
获取此命令可执行的上下文类型。
public IReadOnlyCollection<InteractionContextType> ContextTypes { get; }