Skip to content

Commit

Permalink
🐛 Fix inline query handler creation
Browse files Browse the repository at this point in the history
  • Loading branch information
edloidas committed Sep 10, 2017
1 parent ae218e7 commit 217563d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ const { inline, roll, full, random, help, deprecated } = require('./query');
const { createOptions, createInlineOptions } = require('./options');
const { error } = require('./text');

/*
More event type are described in official API of `node-telegram-bot-api`
https://github.com/yagop/node-telegram-bot-api/blob/master/doc/usage.md
*/

function createHandler(bot, query) {
const { regexp, reply } = query;

Expand All @@ -21,7 +26,7 @@ function createHandler(bot, query) {
function createInlineHandler(bot) {
const { createInlineArticles } = inline;

bot.onText('inline_query', msg => {
bot.on('inline_query', msg => {
try {
const { id, query } = msg;
const options = createInlineOptions();
Expand Down

0 comments on commit 217563d

Please sign in to comment.