commit
This commit is contained in:
parent
a5a86747ad
commit
e5cb45290c
4 changed files with 10 additions and 0 deletions
|
@ -19,6 +19,8 @@ function image_search(query, ctx, bot) {
|
|||
});
|
||||
console.log("--> sent the image for the query: " + query);
|
||||
addToLogs("--> sent the image for the query: " + query);
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -15,8 +15,12 @@ function getJoke(ctx, bot) {
|
|||
if (error) throw new Error(error);
|
||||
|
||||
res = JSON.parse(body)
|
||||
|
||||
bot.telegram.sendMessage(ctx.chat.id, res.body[0].setup, {});
|
||||
|
||||
setTimeout(() => {
|
||||
bot.telegram.sendMessage(ctx.chat.id, res.body[0].punchline, {});
|
||||
}, 500);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue