fixed 2 crashes - thx to gakiloroth, closes #66 closes #65

This commit is contained in:
Master Kwoth
2016-02-25 22:29:58 +01:00
parent e83c35027d
commit 2ee56c615f
2 changed files with 56 additions and 37 deletions

View File

@ -206,6 +206,7 @@ namespace NadekoBot.Modules {
cgb.CreateCommand("lopl")
.Description("Queues up to 50 songs from a directory.")
.Parameter("directory", ParameterType.Unparsed)
.AddCheck(Classes.Permissions.SimpleCheckers.OwnerOnly())
.Do(async e => {
var arg = e.GetArg("directory");
if(string.IsNullOrWhiteSpace(e.GetArg("directory")))
@ -234,6 +235,7 @@ namespace NadekoBot.Modules {
cgb.CreateCommand("lo")
.Description("Queues a local file by specifying a full path. BOT OWNER ONLY.")
.Parameter("path", ParameterType.Unparsed)
.AddCheck(Classes.Permissions.SimpleCheckers.OwnerOnly())
.Do(async e => {
var arg = e.GetArg("path");
if (string.IsNullOrWhiteSpace(arg))