Add Autoload to Module Attribute
[UNTESTED] Adds an optional parameter to the Module attribute, "autoload", which defaults to true. Specifies whether or not the assembly crawler should load this module.
This commit is contained in:
@@ -6,13 +6,16 @@ namespace Discord.Commands
|
||||
public class ModuleAttribute : Attribute
|
||||
{
|
||||
public string Prefix { get; }
|
||||
public ModuleAttribute()
|
||||
public bool Autoload { get; }
|
||||
public ModuleAttribute(bool autoload = true)
|
||||
{
|
||||
Prefix = null;
|
||||
Autoload = autoload;
|
||||
}
|
||||
public ModuleAttribute(string prefix)
|
||||
public ModuleAttribute(string prefix, bool autoload = true)
|
||||
{
|
||||
Prefix = prefix;
|
||||
Autoload = autoload;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user