summaryrefslogtreecommitdiff
path: root/DiscordBot/Auxiliary/Permissions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'DiscordBot/Auxiliary/Permissions.cs')
-rw-r--r--DiscordBot/Auxiliary/Permissions.cs32
1 files changed, 0 insertions, 32 deletions
diff --git a/DiscordBot/Auxiliary/Permissions.cs b/DiscordBot/Auxiliary/Permissions.cs
deleted file mode 100644
index c2cb058..0000000
--- a/DiscordBot/Auxiliary/Permissions.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using System.Collections.Generic;
-using System.Linq;
-using Discord.Commands;
-using Discord.WebSocket;
-
-namespace DiscordBot.Auxiliary
-{
- 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, IEnumerable<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)) return true;
- c.Channel.SendMessageAsync("```xl\n Keine ausreichenden Berechtigungen\n```").Wait();
- return false;
- }
-
- public static void Test(ICommandContext c, string[] roles)
- {
- if (!Check(c, roles)) c.Channel.SendMessageAsync("```xl\n Keine ausreichenden Berechtigungen\n```").Wait();
- }
- }
-} \ No newline at end of file