Update hikka_info.py

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

View File

@ -13,8 +13,6 @@ from .. import loader, utils, version
from ..inline.types import InlineQuery from ..inline.types import InlineQuery
import subprocess import subprocess
start = time.perf_counter_ns()
@loader.tds @loader.tds
class HikkaInfoMod(loader.Module): class HikkaInfoMod(loader.Module):
"""Show userbot info""" """Show userbot info"""
@ -55,6 +53,8 @@ class HikkaInfoMod(loader.Module):
prefix = f"«<code>{utils.escape_html(self.get_prefix())}</code>»" prefix = f"«<code>{utils.escape_html(self.get_prefix())}</code>»"
platform = utils.get_named_platform() platform = utils.get_named_platform()
start = time.perf_counter_ns()
ping=round((time.perf_counter_ns() - start) / 10**6, 3)
for emoji, icon in [ for emoji, icon in [
("🍊", "<emoji document_id=5449599833973203438>🧡</emoji>"), ("🍊", "<emoji document_id=5449599833973203438>🧡</emoji>"),
@ -94,7 +94,7 @@ class HikkaInfoMod(loader.Module):
branch=version.branch, branch=version.branch,
hostname=subprocess.run(['hostname'], stdout=subprocess.PIPE).stdout.decode().strip(), hostname=subprocess.run(['hostname'], stdout=subprocess.PIPE).stdout.decode().strip(),
user=subprocess.run(['whoami'], stdout=subprocess.PIPE).stdout.decode().strip(), user=subprocess.run(['whoami'], stdout=subprocess.PIPE).stdout.decode().strip(),
ping=round((time.perf_counter_ns() - start) / 10**6, 3), ping=ping,
) )
if self.config["custom_message"] if self.config["custom_message"]
else ( else (