Restructure
This commit is contained in:
parent
437cc0e0e1
commit
da91200c74
16 changed files with 43 additions and 110 deletions
38
CommandSystem/CommandGroup.cs
Normal file
38
CommandSystem/CommandGroup.cs
Normal file
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
|
||||
namespace Bot.CommandSystem
|
||||
{
|
||||
|
||||
[System.AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
|
||||
public class CommandGroup : Attribute
|
||||
{
|
||||
public string Command;
|
||||
public int minLevel;
|
||||
public MethodInfo AssignedMethod;
|
||||
public int arguments = 0;
|
||||
public CommandHelp cmdUsage;
|
||||
public MessageHandler.Destinations CommandSource;
|
||||
|
||||
public CommandGroup(string Command, int minLevel, int argCount, string HelpText, MessageHandler.Destinations SourceType)
|
||||
{
|
||||
this.Command = Command;
|
||||
this.minLevel = minLevel;
|
||||
arguments = argCount;
|
||||
CommandSource = SourceType;
|
||||
cmdUsage = new CommandHelp(Command, minLevel, argCount, HelpText, SourceType);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
|
||||
public class CommandGroupMaster : Attribute
|
||||
{
|
||||
public string CommandGroupName;
|
||||
public CommandGroupMaster(string CmdGroupName)
|
||||
{
|
||||
CommandGroupName = CmdGroupName;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue