Module: Mchat::Command::Default::InstanceMethods

Defined in:
lib/mchat/commands/default.rb

Instance Method Summary collapse

Instance Method Details

#default_command_run(words) ⇒ Object



25
26
27
28
29
30
31
32
33
# File 'lib/mchat/commands/default.rb', line 25

def default_command_run(words)
  if _current_channel && _current_nickname && words
    return message_command_run(words)
  else
    _puts "Oops.. This is `Default Mode`:".style.warn
    _puts "if you join channel and have name, it will send message.".style.warn
    _puts "Do nothing. maybe you need join channel or use commands. try /h for more.".style.warn
  end
end

#default_help_docObject



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/mchat/commands/default.rb', line 13

def default_help_doc
  _puts %Q(
#{"Help: Default Mode".style.bold}

if you have joined `channel`
and you have a `name` in channel

you can send message without /m  command, that's default mode.

      )
end