From c4283fd9d484d96cdc59c9a3ab365b18618fcc9b Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Tue, 30 Aug 2016 22:05:49 +0200 Subject: [PATCH] workaround for missing api --- bots/tipbot.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bots/tipbot.js b/bots/tipbot.js index 55b3785..f503b03 100644 --- a/bots/tipbot.js +++ b/bots/tipbot.js @@ -43,7 +43,9 @@ function respond(bot, data) { var subcommand = words.length >= 2 ? words[1] : 'help'; var isAllowedTip = false; - if ((!tipper.is_admin || !tipper.is_owner) && channel.name !== 'bot-sandbox' ){ + + //uncomment the next block when the new lower-level API is added (is_admin and is_owner must be included in the data dump) + if (/*(!tipper.is_admin || !tipper.is_owner) && */(channel.name !== 'C1TEEBS2Z' && !channel.name.startsWith("D") )){ //to check if the command is a tip (hence allowed to pass through) we need to check against all the other commands) if (subcommand === 'help' || subcommand === 'balance' || subcommand === 'deposit' || subcommand === 'withdraw'){ bot.postMessage(channel, 'Please help keep the channel clean: use #bot-sandbox', globalSlackParams);