Exception: Discorb::CloudFlareBanError
- Inherits:
-
HTTPError
- Object
- StandardError
- DiscorbError
- HTTPError
- Discorb::CloudFlareBanError
- Defined in:
- lib/discorb/error.rb
Overview
Represents a error because of a cloudflare ban.
Instance Attribute Summary
Attributes inherited from HTTPError
Instance Method Summary collapse
-
#initialize(_resp, client) ⇒ CloudFlareBanError
constructor
A new instance of CloudFlareBanError.
Constructor Details
#initialize(_resp, client) ⇒ CloudFlareBanError
Returns a new instance of CloudFlareBanError.
99 100 101 102 103 104 105 106 107 108 |
# File 'lib/discorb/error.rb', line 99 def initialize(_resp, client) @client = client @client.close! = <<~MESSAGE The client is banned from CloudFlare. Hint: Try to decrease the number of requests per second, e.g. Use sleep in between requests. MESSAGE warn DiscorbError.instance_method(:initialize).bind(self).call() end |