Class DontAutoLoadAttribute
Prevents the marked module from being loaded automatically.
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
public class DontAutoLoadAttribute : Attribute
- Inheritance
-
DontAutoLoadAttribute
- Inherited Members
Examples
[DontAutoLoad]
public class MyModule : ModuleBase<SocketCommandContext>
{
// ...
}
Remarks
The attribute can be applied to a public class that inherits ModuleBase. By applying this attribute, AddModulesAsync will not discover and add the marked module to the CommandService.