Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9689

Configure telegram bot to send a message

$
0
0

I have a simple telegram bot I made using Node.js and telegraf.
It is a choose your own adventure story.It works as a stand-alone bot and it works in a telegram group or room.
I would like to know how many people have used the bot and read the story.
Can I set the bot to send a message to a private telegram group? or to PM me?

I have tried

    bot.action('begin', (ctx) =>{    ctx.telegram.sendMessage('-groupidnumber','hello')    {    }})

and

    bot.action('begin', (ctx) =>{    ctx.telegram.sendMessage(-groupidnumber,'hello')    {    }}

i tried

    bot.on('begin', (msg) =>{    ctx.telegram.sendMessage('-groupidnumber','hello')    {    }})

and i tried:

  //this is a second start commandbot.start((ctx)=>{    bot.telegram.sendMessage (-123456789,'hello', ctx.from.id, ctx.chat.id)    return ctx.reply('Hey')  })

and a bunch of other variations but nothing has made the bot send a message to that group


Viewing all articles
Browse latest Browse all 9689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>