mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2025-07-27 20:20:56 +00:00
: zap: 添加api请求超时限制
This commit is contained in:
@ -30,7 +30,7 @@ def register_bot():
|
||||
}
|
||||
try:
|
||||
nonebot.logger.info("Waiting for register to Liteyuki...")
|
||||
resp = requests.post(url, json=data)
|
||||
resp = requests.post(url, json=data, timeout=(10, 15))
|
||||
if resp.status_code == 200:
|
||||
data = resp.json()
|
||||
if liteyuki_id := data.get("liteyuki_id"):
|
||||
|
Reference in New Issue
Block a user