Files
Discord.Net/src/Discord.Net.Interactions/Attributes/GroupAttribute.cs
NaN 257f246d1d Format the project with 'dotnet format' (#2551)
* Sync and Re-Format

* Fix Title string.

* Fix indentation.
2023-02-13 18:45:59 +01:00

36 lines
1.0 KiB
C#

using System;
namespace Discord.Interactions
{
/// <summary>
/// Create nested Slash Commands by marking a module as a command group.
/// </summary>
/// <remarks>
/// <see cref="ContextCommandAttribute"/> commands wil not be affected by this.
/// </remarks>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
public class GroupAttribute : Attribute
{
/// <summary>
/// Gets the name of the group.
/// </summary>
public string Name { get; }
/// <summary>
/// Gets the description of the group.
/// </summary>
public string Description { get; }
/// <summary>
/// Create a command group.
/// </summary>
/// <param name="name">Name of the group.</param>
/// <param name="description">Description of the group.</param>
public GroupAttribute(string name, string description)
{
Name = name;
Description = description;
}
}
}