mirror of
http://shenjack.top:5100/shenjack/icalingua-python-bot.git
synced 2024-11-23 20:45:06 +08:00
草,copilot我谢谢你
This commit is contained in:
parent
5a91b54fdd
commit
666678ef23
8
main.py
8
main.py
|
@ -232,11 +232,11 @@ async def add_message(data: Dict[str, Any]):
|
||||||
online_bandwidth: int = data["bandwidth"]
|
online_bandwidth: int = data["bandwidth"]
|
||||||
data_lens = ["B", "KB", "MB", "GB", "TB"]
|
data_lens = ["B", "KB", "MB", "GB", "TB"]
|
||||||
for i in range(5):
|
for i in range(5):
|
||||||
if data_bandwidth < 1024:
|
if data_bytes < 1024:
|
||||||
data_bandwidth = round(data_bandwidth, 5)
|
data_bytes = round(data_bytes, 5)
|
||||||
data_bandwidth = f"{data_bandwidth}{data_lens[i]}"
|
data_bytes = f"{data_bytes}{data_lens[i]}"
|
||||||
break
|
break
|
||||||
data_bandwidth /= 1024
|
data_bytes /= 1024
|
||||||
|
|
||||||
report_msg = (
|
report_msg = (
|
||||||
"OpenBMCLAPI 状态:\n"
|
"OpenBMCLAPI 状态:\n"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user