mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-17 11:31:18 +00:00
✨ support custom response
This commit is contained in:
@ -115,29 +115,6 @@ class StopPropagation(NoneBotException):
|
||||
pass
|
||||
|
||||
|
||||
class RequestDenied(NoneBotException):
|
||||
"""
|
||||
:说明:
|
||||
|
||||
Bot 连接请求不合法。
|
||||
|
||||
:参数:
|
||||
|
||||
* ``status_code: int``: HTTP 状态码
|
||||
* ``reason: str``: 拒绝原因
|
||||
"""
|
||||
|
||||
def __init__(self, status_code: int, reason: str):
|
||||
self.status_code = status_code
|
||||
self.reason = reason
|
||||
|
||||
def __repr__(self):
|
||||
return f"<RequestDenied, status_code={self.status_code}, reason={self.reason}>"
|
||||
|
||||
def __str__(self):
|
||||
return self.__repr__()
|
||||
|
||||
|
||||
class AdapterException(NoneBotException):
|
||||
"""
|
||||
:说明:
|
||||
|
Reference in New Issue
Block a user