mirror of
https://github.com/RPCS3/discord-bot.git
synced 2025-01-09 04:10:25 +00:00
16 lines
411 B
C#
16 lines
411 B
C#
using System;
|
|
using DSharpPlus.CommandsNext;
|
|
|
|
namespace CompatBot.Commands.Attributes
|
|
{
|
|
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, Inherited = false)]
|
|
internal class TriggersTyping: Attribute
|
|
{
|
|
public bool InDmOnly { get; set; }
|
|
|
|
public bool ExecuteCheck(CommandContext ctx)
|
|
{
|
|
return !InDmOnly || ctx.Channel.IsPrivate;
|
|
}
|
|
}
|
|
} |