From f6edadbfcadbc9e38e22500a496a74dd49d96d8a Mon Sep 17 00:00:00 2001 From: TrueDoctor Date: Fri, 1 Jun 2018 11:25:03 +0100 Subject: added Permissions Class for easy Permission required commands --- DiscoBot/Commands/Gm.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'DiscoBot/Commands/Gm.cs') diff --git a/DiscoBot/Commands/Gm.cs b/DiscoBot/Commands/Gm.cs index c1fa4b1..b426655 100644 --- a/DiscoBot/Commands/Gm.cs +++ b/DiscoBot/Commands/Gm.cs @@ -36,11 +36,7 @@ [Alias("GM", "as", "As", "als")] public async Task ProbeAsync([Summary("Fernkampfwaffe")] string name, string command, string waffe, int erschwernis = 0) { - if (!((SocketGuildUser)this.Context.User).Roles.ToList().Exists(v => v.Name.Equals("Meister"))) - { - await this.ReplyAsync("```xl\n Keine ausreichenden Berechtigunen\n```"); - return; - } + Permissions.Test(this.Context, "Meister"); command = command.ToLower(); string res = this.Test(name, command, waffe, erschwernis); -- cgit v1.2.3-70-g09d2