Discord.Net/docs/_overwrites/Commands/DontAutoLoadAttribute.Overwrite.md

22 lines
477 B
Markdown
Raw Permalink Normal View History

2024-06-12 22:43:59 -07:00
---
uid: Discord.Commands.DontAutoLoadAttribute
remarks: *content
---
The attribute can be applied to a public class that inherits
@Discord.Commands.ModuleBase. By applying this attribute,
@Discord.Commands.CommandService.AddModulesAsync* will not discover and
add the marked module to the CommandService.
---
uid: Discord.Commands.DontAutoLoadAttribute
example: [*content]
---
```cs
[DontAutoLoad]
public class MyModule : ModuleBase<SocketCommandContext>
{
// ...
}
```