onUserJoin

This callback will listen to people who join the group.

๐Ÿ’ก

You can put this callback under other callbacks like onMessage and others in your main file.

bot.onUserJoin()

Command:

This command will run when someone joins the group. The onUserJoin callback is also required if you enable userJoinCommand.

bot.userJoinCommand({
groupJid: 'group jid', // you can use the get variables here
code: `code`
})

Code Breakdown:

  • {userJid} - The user JID.
  • {groupJid} - The group JID.
  • {user} - Mentions the user.
  • {group} - Group name.
  • And you can use other whatscode.js functions.

Example:

bot.userJoinCommand({
groupJid: '123@g.us',
code: `Hello {user}, Welcome to {group}
Your profile pic: $profilePic[{userJid}]`
})