def execute(event)
      old_chain = @chain
      @bot.debug 'Executing bare chain'
      result = execute_bare(event)

      @chain_args ||= []

      @bot.debug "Found chain args #{@chain_args}, preliminary result #{result}"

      @chain_args.each do |arg|
        case arg.first
        when 'repeat'
          new_result = ''
          executed_chain = divide_chain(old_chain).last

          arg[1].to_i.times do
            chain_result = CommandChain.new(executed_chain, @bot).execute(event)
            new_result += chain_result if chain_result
          end

          result = new_result
          # TODO: more chain arguments
        end
      end

      result
    end
def execute(event)
      old_chain = @chain
      @bot.debug 'Executing bare chain'
      result = execute_bare(event)

      @chain_args ||= []

      @bot.debug "Found chain args #{@chain_args}, preliminary result #{result}"

      @chain_args.each do |arg|
        case arg.first
        when 'repeat'
          new_result = ''
          executed_chain = divide_chain(old_chain).last

          arg[1].to_i.times do
            chain_result = CommandChain.new(executed_chain, @bot).execute(event)
            new_result += chain_result if chain_result
          end

          result = new_result
          # TODO: more chain arguments
        end
      end

      result
    end
Divides the command chain into chain arguments and command chain, then executes them both.
 @param event [CommandEvent] The event to execute the command with.
 @return [String] the result of the command chain execution.