Update hikka_info.py

pull/40/head
Who? 2024-12-21 14:01:09 +07:00 committed by GitHub
parent 572dbacd95
commit 9ac4ca8d5d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -93,7 +93,7 @@ class HikkaInfoMod(loader.Module):
branch=version.branch,
hostname=subprocess.run(['hostname'], stdout=subprocess.PIPE).stdout.decode().strip(),
user=subprocess.run(['whoami'], stdout=subprocess.PIPE).stdout.decode().strip(),
ping=round((time.perf_counter_ns() - time.perf_counter_ns()) / 10**6, 3),
ping=round((time.perf_counter_ns() - start) / 10**6, 3),
)
if self.config["custom_message"]
else (
@ -167,3 +167,5 @@ class HikkaInfoMod(loader.Module):
self.config["custom_message"] = args
await utils.answer(message, self.strings("setinfo_success"))
start = time.perf_counter_ns()