react command added
This commit is contained in:
parent
29de185cba
commit
8274a22f1b
8 changed files with 180 additions and 76 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue