Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1104190950 opened this issue Mar 29, 2023 · 2 comments

Comments

@1104190950
Copy link

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

@saqoah
Copy link

saqoah commented Apr 5, 2023

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

@samosxin
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants