Method: Discordrb::Commands::CommandChain#initialize

Defined in:
lib/discordrb/commands/parser.rb

#initialize(chain, bot, subchain = false) ⇒ CommandChain

Returns a new instance of CommandChain.

Parameters:

  • chain (String)

    The string the chain should be parsed from.

  • bot (CommandBot)

    The bot that executes this command chain.

  • subchain (true, false) (defaults to: false)

    Whether this chain is a sub chain of another chain.



143
144
145
146
147
148
# File 'lib/discordrb/commands/parser.rb', line 143

def initialize(chain, bot, subchain = false)
  @attributes = bot.attributes
  @chain = chain
  @bot = bot
  @subchain = subchain
end