membership
This block will be executed when the chatbot has been added or removed from a group or channel from Telegram.
membership(event=Enum(:new, :drop), &block)
membership(event=Enum(:new, :drop), &block)Platforms
Platform
Supported
Usage
class MainContext < Conversation
def blocks
membership :new do |chat|
@reply.text "You've added me to #{chat[:title]}"
@reply_group.text "Hello, I'm glad to be part of this #{chat[:type]}"
end
membership :drop do |chat|
@reply.text "You've removed me from #{chat[:title]}"
logger.debug_json chat, :red
end
end
endLast updated
Was this helpful?