This commit is contained in:
Lukian LEIZOUR 2022-12-13 18:20:00 +01:00
parent a5a86747ad
commit e5cb45290c
4 changed files with 10 additions and 0 deletions

4
app.js
View file

@ -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();

View file

@ -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)
})
}

View file

@ -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

Binary file not shown.