class Discorb::CloudFlareBanError

Represents a error because of a cloudflare ban.

Public Class Methods

new(resp, client) click to toggle source
# File lib/discorb/error.rb, line 86
    def initialize(resp, client)
      @client = client
      @client.close!
      DiscorbError.instance_method(:initialize).bind(self).call(<<~MESSAGE)
        The client is banned from CloudFlare.
        Hint: Try to increase the number of requests per second, e.g. Use sleep in between requests.
      MESSAGE
    end