Closed pradhans0906 closed 10 years ago
Use the listen_to :join
handler.
Example:
Class GreetOnJoin
include Cinch::Plugin
listen_to :join, :method=>:join
def join(m, *args)
exit if(m.user == @bot) #otherwise both greats on entry to a channel
m.reply "Welcome to #{m.channel}"
end
end
Thanks for your response ...
Am trying as follows listen_to :join, method: :on_join def on_join(m) post_message(options(m, opcode: 'join', nick: m.user.nick, line: "#{m.user.nick} use this link to get more info"))
But looks like it doesn't work ..can you please let me know what wrong am doing here ?
Hi! i just started using this gem and building a bot on this framework.
Is it possible to make the bot send a message to a channel when anybody joins channel ?
Could anybody help me on this.