From 4fb1a7ea5ec4c2cb7b82d58e986e311d67383fad Mon Sep 17 00:00:00 2001 From: Rilliat Date: Tue, 4 Feb 2025 19:10:28 +0300 Subject: [PATCH] fix ping for arch --- hikka/modules/test.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hikka/modules/test.py b/hikka/modules/test.py index 0304dfc..4fdbdf4 100644 --- a/hikka/modules/test.py +++ b/hikka/modules/test.py @@ -3,7 +3,8 @@ # 🌐 https://github.com/hikariatama/Hikka # You can redistribute it and/or modify it under the terms of the GNU AGPLv3 # 🔑 https://www.gnu.org/licenses/agpl-3.0.html - +import getpass +import platform as lib_platform import inspect import logging import os @@ -380,8 +381,8 @@ class TestMod(loader.Module): ping_hint=( (self.config["hint"]) if random.choice([0, 0, 1]) == 1 else "" ), - hostname=subprocess.run(['hostname'], stdout=subprocess.PIPE).stdout.decode().strip(), - user=subprocess.run(['whoami'], stdout=subprocess.PIPE).stdout.decode().strip(), + hostname=lib_platform.node(), + user=getpass.getuser(), ), reply_to=getattr(message, "reply_to_msg_id", None), )