def prune(amount, strict = false, &block)
      raise ArgumentError, 'Can only delete between 1 and 100 messages!' unless amount.between?(1, 100)

      messages =
        if block_given?
          history(amount).select(&block).map(&:id)
        else
          history_ids(amount)
        end

      case messages.size
      when 0
        0
      when 1
        API::Channel.delete_message(@bot.token, @id, messages.first)
        1
      else
        bulk_delete(messages, strict)
      end
    end
def prune(amount, strict = false, &block)
      raise ArgumentError, 'Can only delete between 1 and 100 messages!' unless amount.between?(1, 100)

      messages =
        if block_given?
          history(amount).select(&block).map(&:id)
        else
          history_ids(amount)
        end

      case messages.size
      when 0
        0
      when 1
        API::Channel.delete_message(@bot.token, @id, messages.first)
        1
      else
        bulk_delete(messages, strict)
      end
    end
Delete the last N messages on this channel.
 @param amount [Integer] The amount of message history to consider for pruning. Must be a value between 2 and 100 (Discord limitation)
 @param strict [true, false] Whether an error should be raised when a message is reached that is too old to be bulk
   deleted. If this is false only a warning message will be output to the console.
 @raise [ArgumentError] if the amount of messages is not a value between 2 and 100
 @yield [message] Yields each message in this channels history for filtering the messages to delete
 @example Pruning messages from a specific user ID
   channel.prune(100) { |m| m.author.id == 83283213010599936 }
 @return [Integer] The amount of messages that were successfully deleted