Add PriorityAttribute and sortby priority in Search

This commit is contained in:
FiniteReality
2016-09-15 18:43:06 +01:00
parent 015e38cc63
commit accb3e27b8
3 changed files with 23 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
using System;
namespace Discord.Commands
{
/// <summary> Sets priority of commands </summary>
[AttributeUsage(AttributeTargets.Method)]
public class PriorityAttribute : Attribute
{
/// <summary> The priority which has been set for the command </summary>
public int Priority { get; }
/// <summary> Creates a new <see cref="PriorityAttribute"/> with the given priority. </summary>
public PriorityAttribute(int priority)
{
Priority = priority;
}
}
}