Path: blob/master/ invest-robot-contest_TinkoffBotTwitch-main/venv/lib/python3.8/site-packages/twitchio/errors.py
7774 views
"""1The MIT License (MIT)23Copyright (c) 2017-2021 TwitchIO45Permission is hereby granted, free of charge, to any person obtaining a6copy of this software and associated documentation files (the "Software"),7to deal in the Software without restriction, including without limitation8the rights to use, copy, modify, merge, publish, distribute, sublicense,9and/or sell copies of the Software, and to permit persons to whom the10Software is furnished to do so, subject to the following conditions:1112The above copyright notice and this permission notice shall be included in13all copies or substantial portions of the Software.1415THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS16OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE18AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER19LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING20FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER21DEALINGS IN THE SOFTWARE.22"""23from typing import Any, Optional242526__all__ = (27"TwitchIOException",28"AuthenticationError",29"InvalidContent",30"IRCCooldownError",31"EchoMessageWarning",32"NoClientID",33"NoToken",34"HTTPException",35"Unauthorized",36)373839class TwitchIOException(Exception):40pass414243class AuthenticationError(TwitchIOException):44pass454647class InvalidContent(TwitchIOException):48pass495051class IRCCooldownError(TwitchIOException):52pass535455class EchoMessageWarning(TwitchIOException):56pass575859class NoClientID(TwitchIOException):60pass616263class NoToken(TwitchIOException):64pass656667class HTTPException(TwitchIOException):68def __init__(69self, message: str, *, reason: Optional[str] = None, status: Optional[int] = None, extra: Optional[Any] = None70):7172self.message = message73self.reason = reason74self.status = status75self.extra = extra767778class Unauthorized(HTTPException):79pass808182