MembershipChecker

This library is used to verify user membership in other channels and chats.

It is recommended to use this library, since it allows you to make the bot work faster

Initial setup

Install Library and create /setup command:

Libs.MembershipChecker.setup()

Then go to App > Bot > Admin Panels anf fill options:

You need create /onNeedJoining command. For example:

Bot.sendMessage("Please join to our channel: @MyChannel")

and /onJoining:

Bot.sendMessage("Thank you")

Thats all.

Additional

If membership is required to use the bot you can use before all command: @

// for all chats and channels:
isMember = Libs.MembershipChecker.isMember()
// for one chat / channel:
// isMember = Libs.MembershipChecker.isMember("@chatName")
if(!isMember){
return // return from execution
}

You can also perfom manuall check if you need button:

// for all chats and channels:
Libs.MembershipChecker.check()