mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-01-20 02:08:20 +08:00
🔇 remove print
This commit is contained in:
parent
e3c3e370cb
commit
b9befc8350
@ -164,8 +164,6 @@ class Bot(BaseBot):
|
|||||||
处理事件并转换为 `Event <#class-event>`_
|
处理事件并转换为 `Event <#class-event>`_
|
||||||
"""
|
"""
|
||||||
data = json.loads(message)
|
data = json.loads(message)
|
||||||
print("handle_event start")
|
|
||||||
print(data)
|
|
||||||
if data.get("type") == "url_verification":
|
if data.get("type") == "url_verification":
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -233,16 +231,12 @@ class Bot(BaseBot):
|
|||||||
"Authorization"] = "Bearer " + self.feishu_config.tenant_access_token
|
"Authorization"] = "Bearer " + self.feishu_config.tenant_access_token
|
||||||
|
|
||||||
try:
|
try:
|
||||||
print("call_api request start")
|
|
||||||
print(data)
|
|
||||||
async with httpx.AsyncClient(headers=headers) as client:
|
async with httpx.AsyncClient(headers=headers) as client:
|
||||||
response = await client.post(
|
response = await client.post(
|
||||||
self.api_root + api,
|
self.api_root + api,
|
||||||
json=data["body"],
|
json=data["body"],
|
||||||
params=data["query"],
|
params=data["query"],
|
||||||
timeout=self.config.api_timeout)
|
timeout=self.config.api_timeout)
|
||||||
print("remote server returned.")
|
|
||||||
print(response.json())
|
|
||||||
if 200 <= response.status_code < 300:
|
if 200 <= response.status_code < 300:
|
||||||
result = response.json()
|
result = response.json()
|
||||||
return _handle_api_result(result)
|
return _handle_api_result(result)
|
||||||
|
@ -199,7 +199,6 @@ class MessageDeserializer:
|
|||||||
data: Dict[str, Any]
|
data: Dict[str, Any]
|
||||||
|
|
||||||
def deserialize(self) -> Message:
|
def deserialize(self) -> Message:
|
||||||
print(self.type, self.data)
|
|
||||||
if self.type == "post":
|
if self.type == "post":
|
||||||
return Message(self._parse_rich_text(self.data))
|
return Message(self._parse_rich_text(self.data))
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user