commit
This commit is contained in:
parent
958729422e
commit
e2976a4654
1 changed files with 19 additions and 11 deletions
8
app.js
8
app.js
|
@ -15,6 +15,7 @@ function image_search(query, ctx) {
|
|||
}
|
||||
|
||||
function isTrue(message, ctx) {
|
||||
if (message != undefined) {
|
||||
var totalSum = 0
|
||||
|
||||
for (var i = 0; i < message.length; i++) {
|
||||
|
@ -28,6 +29,9 @@ function isTrue(message, ctx) {
|
|||
bot.telegram.sendMessage(ctx.chat.id, "This message is false", {"reply_to_message_id": ctx.update.message.reply_to_message.message_id});
|
||||
console.log("--> sent false for the query: " + message);
|
||||
}
|
||||
} else {
|
||||
bot.telegram.sendMessage(ctx.chat.id, "Please reply to a text message", {'reply_to_message_id': ctx.update.message.message_id});
|
||||
}
|
||||
}
|
||||
|
||||
//bot commands
|
||||
|
@ -74,5 +78,9 @@ bot.command('suggest', ctx => {
|
|||
console.log('--> sent suggestion message to the channel')
|
||||
})
|
||||
|
||||
bot.on('photo', ctx => {
|
||||
console.log(ctx)
|
||||
})
|
||||
|
||||
//bot launch
|
||||
bot.launch();
|
Loading…
Add table
Add a link
Reference in a new issue