This repository has been archived by the owner on Jun 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for plugin client intent specification
- Loading branch information
1 parent
1aa88b0
commit ed45179
Showing
2 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using DisCatSharp; | ||
|
||
namespace BrackeysBot.API.Plugins; | ||
|
||
/// <summary> | ||
/// Specifies the Discord client intents that this plugin will utilise. | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Class)] | ||
public sealed class PluginIntentsAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="PluginIntentsAttribute" /> class. | ||
/// </summary> | ||
/// <param name="intents">The intents.</param> | ||
public PluginIntentsAttribute(DiscordIntents intents) | ||
{ | ||
Intents = intents; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the intents. | ||
/// </summary> | ||
/// <value>The intents.</value> | ||
public DiscordIntents Intents { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters