TelegramBots icon indicating copy to clipboard operation
TelegramBots copied to clipboard

Hello, how can I let the robot automatically know that a new user has joined the group?

Open 1104190950 opened this issue 1 year ago • 2 comments

Hello, how can I let the robot automatically know that a new user has joined the group? I want to implement the function that the BOT sends a verification code for the user to verify after the new user joins the group

1104190950 avatar Mar 29 '23 07:03 1104190950

use private static final String NEWCHATMEMBERS_FIELD = "new_chat_members";

if ( update.message.newChatMembers.isNotEmpty() ) {
                val newChatMembers = update.message.newChatMembers
                //
}

you get a (Mutable)List<User!>! as a result

saqoah avatar Apr 05 '23 18:04 saqoah

if group is public, Maybe I don't get the update information

samosxin avatar Aug 21 '23 03:08 samosxin