summaryrefslogtreecommitdiff
path: root/DiscordBot/Rework/Permissions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'DiscordBot/Rework/Permissions.cs')
-rw-r--r--DiscordBot/Rework/Permissions.cs38
1 files changed, 0 insertions, 38 deletions
diff --git a/DiscordBot/Rework/Permissions.cs b/DiscordBot/Rework/Permissions.cs
deleted file mode 100644
index 119e628..0000000
--- a/DiscordBot/Rework/Permissions.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using System.Linq;
-using Discord.Commands;
-using Discord.WebSocket;
-
-namespace DiscordBot.Rework
-{
- public static class Permissions
- {
- public static bool Check(ICommandContext c, string role)
- {
- return ((SocketGuildUser)c.User).Roles.ToList().Exists(v => v.Name.Equals(role));
- }
-
- public static bool Check(ICommandContext c, string[] roles)
- {
- return roles.Any(role => ((SocketGuildUser)c.User).Roles.ToList().Exists(v => v.Name.Equals(role)));
- }
-
- public static bool Test(ICommandContext c, string role)
- {
- if (!Check(c, role))
- {
- c.Channel.SendMessageAsync("```xl\n Keine ausreichenden Berechtigungen\n```").Wait();
- return false;
- }
-
- return true;
- }
-
- public static void Test(ICommandContext c, string[] roles)
- {
- if (!Check(c, roles))
- {
- c.Channel.SendMessageAsync("```xl\n Keine ausreichenden Berechtigungen\n```").Wait();
- }
- }
- }
-}