feat: 消息平台热重载

This commit is contained in:
Junyan Qin
2024-11-16 12:40:57 +08:00
parent 3239c9ec3f
commit bb219889e5
14 changed files with 168 additions and 36 deletions

9
pkg/utils/ip.py Normal file
View File

@@ -0,0 +1,9 @@
import aiohttp
async def get_myip() -> str:
try:
async with aiohttp.ClientSession() as session:
async with session.get("https://ip.useragentinfo.com/myip") as response:
return await response.text()
except Exception as e:
return '0.0.0.0'