tip-kudos-recipients: Fix error while parsing kudos
This commit is contained in:
parent
a6e779cae0
commit
04f25e0650
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue