From 58ff017bf8f2cd21812082f2eb0cce1f1c60aaa0 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Thu, 5 Jan 2017 11:21:38 +0100 Subject: [PATCH] >pick has no cooldown on self-hosted bots --- .../Modules/Games/Commands/PlantAndPickCommands.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs b/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs index 6d17dd76..69fbc862 100644 --- a/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs +++ b/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs @@ -111,9 +111,12 @@ namespace NadekoBot.Modules.Games { var channel = (ITextChannel)Context.Channel; - if (!(await channel.Guild.GetCurrentUserAsync()).GetPermissions(channel).ManageMessages || !usersRecentlyPicked.Add(Context.User.Id)) + if (!(await channel.Guild.GetCurrentUserAsync()).GetPermissions(channel).ManageMessages) return; - +#if GLOBAL_NADEKO + if (!usersRecentlyPicked.Add(Context.User.Id)) + return; +#endif try { @@ -131,8 +134,10 @@ namespace NadekoBot.Modules.Games } finally { +#if GLOBAL_NADEKO await Task.Delay(60000); usersRecentlyPicked.TryRemove(Context.User.Id); +#endif } }