diff options
author | TrueDoctor <d-kobert@web.de> | 2018-06-01 11:25:03 +0100 |
---|---|---|
committer | TrueDoctor <d-kobert@web.de> | 2018-06-01 11:25:03 +0100 |
commit | f6edadbfcadbc9e38e22500a496a74dd49d96d8a (patch) | |
tree | 36749e99ee87b9f481254a890acfb7149e6b3fb8 /DiscoBot/Commands/ProbenTest.cs | |
parent | 181dba0f96d8792e3565286b3983830674624cc5 (diff) |
added Permissions Class for easy Permission required commands
Diffstat (limited to 'DiscoBot/Commands/ProbenTest.cs')
-rw-r--r-- | DiscoBot/Commands/ProbenTest.cs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/DiscoBot/Commands/ProbenTest.cs b/DiscoBot/Commands/ProbenTest.cs index a73f4fd..bdfaf23 100644 --- a/DiscoBot/Commands/ProbenTest.cs +++ b/DiscoBot/Commands/ProbenTest.cs @@ -10,7 +10,24 @@ [Alias("T", "Talent", "talent", "zauber", "z", "versuche")] public Task TalentAsync([Summary("Talent oder Zaubername")] string talent, int erschwernis = 0) { - string res = Gm.CheckCommand(Dsa.Relation[this.Context.User.Username], CommandTypes.Talent, talent, erschwernis); + string res; + try + { + res = Gm.CheckCommand( + Dsa.Relation[this.Context.User.Username], + CommandTypes.Talent, + talent, + erschwernis); + } + catch + { + res = Gm.CheckCommand( + Dsa.Relation["Tardis"], + CommandTypes.Talent, + talent, + erschwernis); + } + return this.ReplyAsync("```xl\n" + res + "\n```"); } |