You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

GroupAttribute.cs 707 B

1234567891011121314151617181920212223
  1. using System;
  2. namespace Discord.Commands
  3. {
  4. /// <summary> Marks the module as a command group. </summary>
  5. [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
  6. public class GroupAttribute : Attribute
  7. {
  8. /// <summary> Gets the prefix set for the module. </summary>
  9. public string Prefix { get; }
  10. public GroupAttribute()
  11. {
  12. Prefix = null;
  13. }
  14. /// <summary> Creates a <see cref="GroupAttribute"/> with the provided prefix. </summary>
  15. /// <param name="prefix"> The prefix of the module group.</param>
  16. public GroupAttribute(string prefix)
  17. {
  18. Prefix = prefix;
  19. }
  20. }
  21. }