mirror of
https://github.com/RPCS3/discord-bot.git
synced 2025-04-17 20:30:05 +00:00
28 lines
1.4 KiB
C#
28 lines
1.4 KiB
C#
using DSharpPlus.Commands.ContextChecks;
|
|
|
|
namespace CompatBot.Commands.Attributes;
|
|
|
|
internal abstract class CheckAttributeWithReactions(
|
|
DiscordEmoji? reactOnSuccess = null,
|
|
DiscordEmoji? reactOnFailure = null
|
|
) : ContextCheckAttribute
|
|
{
|
|
public DiscordEmoji? ReactOnSuccess { get; } = reactOnSuccess;
|
|
public DiscordEmoji? ReactOnFailure { get; } = reactOnFailure;
|
|
}
|
|
|
|
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, Inherited = false)]
|
|
internal class RequiresBotSudoerRoleAttribute(): CheckAttributeWithReactions(reactOnFailure: Config.Reactions.Denied);
|
|
|
|
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, Inherited = false)]
|
|
internal class RequiresBotModRoleAttribute(): CheckAttributeWithReactions(reactOnFailure: Config.Reactions.Denied);
|
|
|
|
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, Inherited = false)]
|
|
internal class RequiresWhitelistedRoleAttribute(): CheckAttributeWithReactions(reactOnFailure: Config.Reactions.Denied);
|
|
|
|
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, Inherited = false)]
|
|
internal class RequiresSmartlistedRoleAttribute(): CheckAttributeWithReactions(reactOnFailure: Config.Reactions.Denied);
|
|
|
|
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, Inherited = false)]
|
|
internal class RequiresSupporterRoleAttribute(): CheckAttributeWithReactions(reactOnFailure: Config.Reactions.Denied);
|