fix ping for arch

pull/85/head
Rilliat 2025-02-04 19:10:28 +03:00
parent 8dac8acb35
commit 4fb1a7ea5e
1 changed files with 4 additions and 3 deletions

View File

@ -3,7 +3,8 @@
# 🌐 https://github.com/hikariatama/Hikka # 🌐 https://github.com/hikariatama/Hikka
# You can redistribute it and/or modify it under the terms of the GNU AGPLv3 # You can redistribute it and/or modify it under the terms of the GNU AGPLv3
# 🔑 https://www.gnu.org/licenses/agpl-3.0.html # 🔑 https://www.gnu.org/licenses/agpl-3.0.html
import getpass
import platform as lib_platform
import inspect import inspect
import logging import logging
import os import os
@ -380,8 +381,8 @@ class TestMod(loader.Module):
ping_hint=( ping_hint=(
(self.config["hint"]) if random.choice([0, 0, 1]) == 1 else "" (self.config["hint"]) if random.choice([0, 0, 1]) == 1 else ""
), ),
hostname=subprocess.run(['hostname'], stdout=subprocess.PIPE).stdout.decode().strip(), hostname=lib_platform.node(),
user=subprocess.run(['whoami'], stdout=subprocess.PIPE).stdout.decode().strip(), user=getpass.getuser(),
), ),
reply_to=getattr(message, "reply_to_msg_id", None), reply_to=getattr(message, "reply_to_msg_id", None),
) )