Fixed kick permission requirement

This commit is contained in:
Kwoth 2016-10-09 00:21:29 +02:00
parent cca96a93a1
commit f41a8a1682
2 changed files with 10 additions and 1 deletions

View File

@ -275,6 +275,7 @@ namespace NadekoBot.Modules.Administration
[NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)]
[RequirePermission(GuildPermission.KickMembers)]
public async Task Kick(IUserMessage umsg, IGuildUser user, [Remainder] string msg = null)
{
var channel = (ITextChannel)umsg.Channel;
@ -695,6 +696,7 @@ namespace NadekoBot.Modules.Administration
[NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)]
[OwnerOnly]
public async Task Donadd(IUserMessage umsg, IUser donator, int amount)
{
var channel = (ITextChannel)umsg.Channel;

View File

@ -49,9 +49,16 @@ namespace NadekoBot.Modules.CustomReactions
var reaction = reactions.Where(cr => cr.Trigger == umsg.Content).Shuffle().FirstOrDefault();
if (reaction != null)
{
await channel.SendMessageAsync(reaction.Response).ConfigureAwait(false);
try { await channel.SendMessageAsync(reaction.Response).ConfigureAwait(false); } catch { }
return;
}
}
var greaction = GlobalReactions.Where(cr => cr.Trigger == umsg.Content).Shuffle().FirstOrDefault();
if (greaction != null)
{
try { await channel.SendMessageAsync(greaction.Response).ConfigureAwait(false); } catch { }
return;
}
});
return Task.CompletedTask;
};