Files
archived-discord-bot/CompatBot/Commands/Attributes/RequiresNotMedia.cs
2023-04-21 02:05:59 +05:00

13 lines
432 B
C#

using System;
using System.Threading.Tasks;
using DSharpPlus.CommandsNext;
using DSharpPlus.CommandsNext.Attributes;
namespace CompatBot.Commands.Attributes;
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, Inherited = false)]
internal class RequiresNotMedia: CheckBaseAttribute
{
public override Task<bool> ExecuteCheckAsync(CommandContext ctx, bool help)
=> Task.FromResult(ctx.Channel.Name != "media");
}