Class: Cinch::BotTemplate::Templates::Hello

Inherits:
Object
  • Object
show all
Defined in:
lib/cinch/bot_template/templates/hello.rb

Instance Method Summary collapse

Instance Method Details

#generate(nick:) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/cinch/bot_template/templates/hello.rb', line 6

def generate(nick:)


  hello = "  require 'cinch'\n\n  bot = Cinch::Bot.new do\n    configure do |c|\n      c.server = \"irc.electrocode.net\"\n      c.channels = [\"#bots\"]\n      c.nick = '\#{nick}'\n    end\n\n    on :message, \"hello\" do |m|\n      m.reply \"Hello, \\\#{m.user.nick}\"\n    end\n  end\n\n  bot.start\n  HELLO\n\n  hello\nend\n"