Merge pull request #327 from appelemac/patch-7

return on error message in .aar
This commit is contained in:
Master Kwoth 2016-06-04 20:46:09 +02:00
commit 68eed39596

View File

@ -32,8 +32,8 @@ namespace NadekoBot.Modules.Administration.Commands
internal override void Init(CommandGroupBuilder cgb) internal override void Init(CommandGroupBuilder cgb)
{ {
cgb.CreateCommand(Module.Prefix + "aar") cgb.CreateCommand(Module.Prefix + "autoassignrole")
.Alias(Module.Prefix + "autoassignrole") .Alias(Module.Prefix + "aar")
.Description($"Automaticaly assigns a specified role to every user who joins the server. Type `.aar` to disable, `.aar Role Name` to enable") .Description($"Automaticaly assigns a specified role to every user who joins the server. Type `.aar` to disable, `.aar Role Name` to enable")
.Parameter("role", ParameterType.Unparsed) .Parameter("role", ParameterType.Unparsed)
.AddCheck(new SimpleCheckers.ManageRoles()) .AddCheck(new SimpleCheckers.ManageRoles())
@ -42,6 +42,7 @@ namespace NadekoBot.Modules.Administration.Commands
if (!e.Server.CurrentUser.ServerPermissions.ManageRoles) if (!e.Server.CurrentUser.ServerPermissions.ManageRoles)
{ {
await e.Channel.SendMessage("I do not have the permission to manage roles."); await e.Channel.SendMessage("I do not have the permission to manage roles.");
return;
} }
var r = e.GetArg("role")?.Trim(); var r = e.GetArg("role")?.Trim();