commit
This commit is contained in:
parent
a5a86747ad
commit
e5cb45290c
4 changed files with 10 additions and 0 deletions
4
app.js
4
app.js
|
@ -92,5 +92,9 @@ bot.command('q', ctx => {
|
|||
answerQuestion(ctx.message.text.slice(+3), ctx, bot)
|
||||
})
|
||||
|
||||
bot.command('sb' , ctx => {
|
||||
bot.telegram.sendAudio(ctx.chat.id, "./src/audio/Spider-Bigard.mp3", {})
|
||||
})
|
||||
|
||||
//bot launch
|
||||
bot.launch();
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
BIN
src/audio/Spider-Bigard.mp3
Normal file
BIN
src/audio/Spider-Bigard.mp3
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue