mirror of
https://gitlab.com/Deukhoofd/DeukBot4.git
synced 2026-04-04 11:40:05 +00:00
Initial work
This commit is contained in:
17
DeukBot4/MessageHandlers/Attributes/CommandAttribute.cs
Normal file
17
DeukBot4/MessageHandlers/Attributes/CommandAttribute.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using DeukBot4.MessageHandlers.Permissions;
|
||||
|
||||
namespace DeukBot4.MessageHandlers
|
||||
{
|
||||
public class CommandAttribute : Attribute
|
||||
{
|
||||
public string Command { get; }
|
||||
public PermissionLevel Permission { get; }
|
||||
|
||||
public CommandAttribute(string command, PermissionLevel permission)
|
||||
{
|
||||
Command = command;
|
||||
Permission = permission;
|
||||
}
|
||||
}
|
||||
}
|
||||
16
DeukBot4/MessageHandlers/Attributes/CommandHelpAttribute.cs
Normal file
16
DeukBot4/MessageHandlers/Attributes/CommandHelpAttribute.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
|
||||
namespace DeukBot4.MessageHandlers
|
||||
{
|
||||
public class CommandHelpAttribute : Attribute
|
||||
{
|
||||
public string ShortHelp { get; }
|
||||
public string LongHelp { get; }
|
||||
|
||||
public CommandHelpAttribute(string shortHelp, string longHelp)
|
||||
{
|
||||
ShortHelp = shortHelp;
|
||||
LongHelp = longHelp;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using DeukBot4.MessageHandlers.CommandHandler.RequestStructure;
|
||||
|
||||
namespace DeukBot4.MessageHandlers
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
|
||||
public class CommandParametersAttribute : Attribute
|
||||
{
|
||||
public ParameterMatcher.ParameterType[] Types { get; }
|
||||
|
||||
public CommandParametersAttribute(ParameterMatcher.ParameterType[] types)
|
||||
{
|
||||
Types = types;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user