Cleaned up command attributes

This commit is contained in:
RogueException
2016-08-18 11:28:12 -03:00
parent f8ae8bd9c3
commit 6d766d5f98
5 changed files with 20 additions and 14 deletions

View File

@@ -7,20 +7,10 @@ namespace Discord.Commands
public class DescriptionAttribute : Attribute
{
public string Text { get; }
public DescriptionAttribute(string text)
{
Text = text;
}
}
// Brief summary of method/module/parameter
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Parameter)]
public class SummaryAttribute : Attribute
{
public string Text { get; }
public SummaryAttribute(string text)
{
Text = text;
}
}
}

View File

@@ -6,6 +6,7 @@ namespace Discord.Commands
public class GroupAttribute : Attribute
{
public string Prefix { get; }
public GroupAttribute()
{
Prefix = null;

View File

@@ -6,7 +6,8 @@ namespace Discord.Commands
public class ModuleAttribute : Attribute
{
public string Prefix { get; }
public bool AutoLoad { get; set; }
public bool AutoLoad { get; }
public ModuleAttribute()
{
Prefix = null;

View File

@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Discord.Commands

View File

@@ -0,0 +1,16 @@
using System;
namespace Discord.Commands
{
// Brief summary of method/module/parameter
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Parameter)]
public class SummaryAttribute : Attribute
{
public string Text { get; }
public SummaryAttribute(string text)
{
Text = text;
}
}
}