mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-28 00:31:14 +00:00
💥 drop self_id call_api support
This commit is contained in:
@ -152,7 +152,6 @@ class Bot(abc.ABC):
|
||||
:参数:
|
||||
|
||||
* ``api: str``: API 名称
|
||||
* ``self_id: Optional[str]``: 指定调用 API 的机器人
|
||||
* ``**data``: API 数据
|
||||
|
||||
:示例:
|
||||
@ -176,11 +175,7 @@ class Bot(abc.ABC):
|
||||
result = None
|
||||
|
||||
try:
|
||||
if "self_id" in data and data["self_id"]:
|
||||
bot = self.driver.bots[str(data["self_id"])]
|
||||
result = await bot._call_api(api, **data)
|
||||
else:
|
||||
result = await self._call_api(api, **data)
|
||||
result = await self._call_api(api, **data)
|
||||
except Exception as e:
|
||||
exception = e
|
||||
|
||||
|
Reference in New Issue
Block a user