def create_message(data)
      message = Discordrb::Message.new(data, self)
      return message if message.from_bot? && !@should_parse_self
      return message if message.webhook? && !@attributes[:webhook_commands]

      unless message.author
        Discordrb::LOGGER.warn("Received a message (#{message.inspect}) with nil author! Ignoring, please report this if you can")
        return
      end

      event = CommandEvent.new(message, self)

      chain = trigger?(message)
      return message unless chain

      # Don't allow spaces between the prefix and the command
      if chain.start_with?(' ') && !@attributes[:spaces_allowed]
        debug('Chain starts with a space')
        return message
      end

      if chain.strip.empty?
        debug('Chain is empty')
        return message
      end

      execute_chain(chain, event)

      # Return the message so it doesn't get parsed again during the rest of the dispatch handling
      message
    end
def create_message(data)
      message = Discordrb::Message.new(data, self)
      return message if message.from_bot? && !@should_parse_self
      return message if message.webhook? && !@attributes[:webhook_commands]

      unless message.author
        Discordrb::LOGGER.warn("Received a message (#{message.inspect}) with nil author! Ignoring, please report this if you can")
        return
      end

      event = CommandEvent.new(message, self)

      chain = trigger?(message)
      return message unless chain

      # Don't allow spaces between the prefix and the command
      if chain.start_with?(' ') && !@attributes[:spaces_allowed]
        debug('Chain starts with a space')
        return message
      end

      if chain.strip.empty?
        debug('Chain is empty')
        return message
      end

      execute_chain(chain, event)

      # Return the message so it doesn't get parsed again during the rest of the dispatch handling
      message
    end
Internal handler for MESSAGE_CREATE that is overwritten to allow for command handling