-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChecks.cs
36 lines (32 loc) · 916 Bytes
/
Checks.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using DisCatSharp.ApplicationCommands;
using DisCatSharp.CommandsNext;
using DisCatSharp.CommandsNext.Attributes;
using System.Threading.Tasks;
namespace BotName
{
public class IsBannedCheck : CheckBaseAttribute
{
public override async Task<bool> ExecuteCheckAsync(CommandContext context, bool help)
{
if (await Database.Database.Blacklists.BlacklistContains(context.Member.Id))
{
return false;
}
else
{
return true;
}
}
}
public class BannedCheck : SlashCheckBaseAttribute
{
public override async Task<bool> ExecuteChecksAsync(InteractionContext ctx)
{
if (await Database.Database.Blacklists.BlacklistContains(ctx.Member.Id))
{
return false;
}
else return true;
}
}
}