mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2025-09-08 06:56:26 +00:00
✨ [nonebot-plugin]状态提供更多品牌的cpu支持
This commit is contained in:
@ -225,10 +225,20 @@ async def get_hardware_data() -> dict:
|
||||
pass
|
||||
swap = psutil.swap_memory()
|
||||
cpu_brand_raw = cpuinfo.get_cpu_info().get("brand_raw", "Unknown")
|
||||
if "AMD" in cpu_brand_raw:
|
||||
if "amd" in cpu_brand_raw.lower():
|
||||
brand = "AMD"
|
||||
elif "Intel" in cpu_brand_raw:
|
||||
elif "intel" in cpu_brand_raw.lower():
|
||||
brand = "Intel"
|
||||
elif "apple" in cpu_brand_raw.lower():
|
||||
brand = "Apple"
|
||||
elif "qualcomm" in cpu_brand_raw.lower():
|
||||
brand = "Qualcomm"
|
||||
elif "mediatek" in cpu_brand_raw.lower():
|
||||
brand = "MediaTek"
|
||||
elif "samsung" in cpu_brand_raw.lower():
|
||||
brand = "Samsung"
|
||||
elif "nvidia" in cpu_brand_raw.lower():
|
||||
brand = "NVIDIA"
|
||||
else:
|
||||
brand = "Unknown"
|
||||
result = {
|
||||
|
@ -31,6 +31,7 @@ async def _(bot: Bot, event: MessageEvent):
|
||||
raw_message=event.raw_message,
|
||||
data=event.dict(),
|
||||
bot_id=bot.self_id,
|
||||
user_id=str(event.user_id),
|
||||
session_id=str(event.user_id if event.message_type == "private" else event.group_id),
|
||||
session_type=event.message_type,
|
||||
receive_channel="event_to_nonebot"
|
||||
|
Reference in New Issue
Block a user