Permalink
Browse files

Fixed ctx and bot not defined

  • Loading branch information...
bostrot committed Aug 17, 2018
1 parent e4ddd84 commit 6f0517c8f95a2dcbfaa1bafd50b70d0c5c340d4c
Showing with 2 additions and 2 deletions.
  1. +2 −2 bin/ticket_handler.js
@@ -8,7 +8,7 @@ function ticketHandler(bot, ctx) {
staffChat();
} else if (chat.type === "private") {
// create a ticket and send to staff
customerChat(chat);
customerChat(ctx, bot, chat);
}
})
}
@@ -39,7 +39,7 @@ function staffChat() {
})
}

function customerChat(chat) {
function customerChat(ctx, bot, chat) {
cache.tickedID = ctx.message.from.id
if (cache.ticketIDs[cache.ticketID] === undefined) {
cache.ticketIDs.push(cache.tickedID)

0 comments on commit 6f0517c

Please sign in to comment.