first commit

This commit is contained in:
balos 2025-04-26 20:05:22 +02:00
commit f680dd869b
6 changed files with 166 additions and 0 deletions

18
commands/admin.cs Normal file
View file

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