diff --git a/bot_scripts/check-bot-balance.js b/bot_scripts/check-bot-balance.js index 18b7068..6fea888 100644 --- a/bot_scripts/check-bot-balance.js +++ b/bot_scripts/check-bot-balance.js @@ -21,7 +21,7 @@ var isCheckingBalance = false module.exports = robot => { if (!options || !options.accounts || options.accounts.length === 0) { - robot.log.debug(`${botName} - No accounts counfigured. Disabling script`) + robot.log.debug(`${botName} - No accounts configured. Disabling script`) return } diff --git a/bot_scripts/tip-kudos-recipients.js b/bot_scripts/tip-kudos-recipients.js index 27e46f0..8f82dae 100644 --- a/bot_scripts/tip-kudos-recipients.js +++ b/bot_scripts/tip-kudos-recipients.js @@ -32,6 +32,10 @@ var isCheckingUpdates = false var previousNonce = null module.exports = robot => { + if (!options || !token) { + robot.log.debug(`${botName} - No options configured. Disabling script`) + return + } if (!privateKey.startsWith('0x')) { robot.log.error(`${botName} - Private key must start with 0x. Disabling script`) return @@ -112,7 +116,7 @@ async function fetchPendingKudos (robot, data) { // and leave it for a later time, so that people have time to vote continue } - if (message.type !== 'message' || message.subtype || !message.bot_id) { + if (message.type !== 'message' || message.subtype || !message.bot_id || !message.attachments) { continue }