react command added

This commit is contained in:
balos 2025-05-03 16:40:35 +02:00
parent 29de185cba
commit 8274a22f1b
8 changed files with 180 additions and 76 deletions

View file

@ -3,16 +3,18 @@ using DSharpPlus.CommandsNext.Attributes;
using System.Threading.Tasks;
using System.Linq;
public class HasAdminRole : CheckBaseAttribute
namespace T3k3rg0.Commands
{
public override async Task<bool> ExecuteCheckAsync(CommandContext ctx, bool help)
public class HasAdminRole : CheckBaseAttribute
{
bool hasAdminRole = ctx.Member?.Roles.Any(role => role.Name == "Admin") ?? false;
if (!hasAdminRole)
public override async Task<bool> ExecuteCheckAsync(CommandContext ctx, bool help)
{
await ctx.RespondAsync("Csicskáknak kuss van !");
bool hasAdminRole = ctx.Member?.Roles.Any(role => role.Name == "Admin") ?? false;
if (!hasAdminRole)
{
await ctx.RespondAsync("Csicskáknak kuss van !");
}
return (hasAdminRole);
}
return (hasAdminRole);
}
}