permission fix for delete custom reactions

This commit is contained in:
Master Kwoth 2016-05-07 18:58:12 +02:00
parent 2d3aa08882
commit 61b3254f6d
3 changed files with 7 additions and 5 deletions

View File

@ -60,6 +60,7 @@ namespace NadekoBot.Modules.Administration.Commands
.Description("Deletes a custome reaction with given name (and index)")
.Parameter("name", ParameterType.Required)
.Parameter("index", ParameterType.Optional)
.AddCheck(SimpleCheckers.OwnerOnly())
.Do(async e =>
{
var name = e.GetArg("name")?.Trim();

View File

@ -33,7 +33,7 @@ namespace NadekoBot.Modules.Conversations
manager.CreateCommands("", cgb =>
{
cgb.AddCheck(PermissionChecker.Instance);
cgb.CreateCommand("..")
.Description("Adds a new quote with the specified name (single word) and message (no limit).\n**Usage**: .. abc My message")
.Parameter("keyword", ParameterType.Required)
@ -139,7 +139,7 @@ namespace NadekoBot.Modules.Conversations
await e.Channel.SendMessage(e.User.Mention + " I am sad. My Master is not with me.").ConfigureAwait(false);
}
});
cgb.CreateCommand("fire")
.Description("Shows a unicode fire message. Optional parameter [x] tells her how many times to repeat the fire.\n**Usage**: @NadekoBot fire [x]")
.Parameter("times", ParameterType.Optional)
@ -236,7 +236,7 @@ namespace NadekoBot.Modules.Conversations
else
await e.Channel.SendMessage("I can't find a message mentioning you.").ConfigureAwait(false);
});
cgb.CreateCommand("hide")
.Description("Hides Nadeko in plain sight!11!!")
.Do(async e =>
@ -300,7 +300,8 @@ namespace NadekoBot.Modules.Conversations
await e.Channel.SendMessage(construct).ConfigureAwait(false);
});
cgb.CreateCommand("av").Alias("avatar")
cgb.CreateCommand("av")
.Alias("avatar")
.Parameter("mention", ParameterType.Required)
.Description("Shows a mentioned person's avatar.\n**Usage**: ~av @X")
.Do(async e =>

View File

@ -7,6 +7,7 @@ using NadekoBot.Classes.JSONModels;
using NadekoBot.Modules.Administration;
using NadekoBot.Modules.ClashOfClans;
using NadekoBot.Modules.Conversations;
using NadekoBot.Modules.CustomReactions;
using NadekoBot.Modules.Gambling;
using NadekoBot.Modules.Games;
using NadekoBot.Modules.Games.Commands;
@ -26,7 +27,6 @@ using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NadekoBot.Modules.CustomReactions;
namespace NadekoBot
{