2

Looking at the Telegram API documentation I can't find any hook that allow me to call a method when an user enter in a group.

Note that forma 'enter' I mean when the user open the chat, and not a join to the group.

I'm using TelegrafJS framework.

Kind regards.

sfarzoso
  • 1,356
  • 2
  • 24
  • 65

2 Answers2

2

As far as I know it's a security feature that you have no access to what people 'open', there is a reason that the join button is there, so that people share their info with the group when they are comfortable sharing it.

If there was, you'd have to use the same solution with a different result (I.E: new_browsed_users) Since the Update object doesn't return it, then we can assume there isn't a way.

Telegram Bot Event When Users Join To Channel

Don
  • 490
  • 3
  • 9
1

I'm not in TelegrafJS, but should be like this:

bot.on('new_chat_members', (ctx) => ctx.reply(''))

See "new_chat_members" here.

Badiboy
  • 1,519
  • 1
  • 18
  • 31
  • Hi, this method is only triggered when an user join the chat, my goal is fire a function each time the user open the chat, but I guess is not possible for now – sfarzoso Nov 14 '19 at 13:53
  • @sfarzoso absolutely impossible. No action from user - no event. – Badiboy Nov 15 '19 at 12:03