ForgeCore/CommandSystem/CommandGroup.cs
2019-12-20 17:38:55 -07:00

38 lines
1.1 KiB
C#

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;
}
}
}