Update test.py

pull/28/head
Who? 2024-11-27 23:17:08 +07:00 committed by GitHub
parent bca3815c1c
commit db52e1fa7c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 1 deletions

View File

@ -40,6 +40,7 @@ class TestMod(loader.Module):
"{uptime} - It's your uptime.\n"
"{ping_hint} - This is the same hint as in the hikka module, it is chosen with random chance, also you can specify this hint in the config ",
"hint": "Set a hint",
"ping_emoji": "Emoji that appears when ping does not increase significantly",
}
strings_ru = {
@ -49,6 +50,7 @@ class TestMod(loader.Module):
"{uptime} - Это ваш аптайм\n"
"{ping_hint} - подсказка\n",
"hint": "Укажите подсказку",
"ping_emoji": "Эмодзи которое появляется при не значительном росте пинга.",
}
def __init__(self):
@ -100,6 +102,12 @@ class TestMod(loader.Module):
lambda: self.strings["hint"],
validator=loader.validators.String(),
),
loader.ConfigValue(
"ping emoji",
🪐,
lambda: self.strings["ping_emoji"],
validator=loader.validators.String(),
),
)
def _pass_config_to_logger(self):
@ -368,7 +376,7 @@ class TestMod(loader.Module):
async def ping(self, message: Message):
"""- Find out your userbot ping"""
start = time.perf_counter_ns()
message = await utils.answer(message, "🌘")
message = await utils.answer(message, self.config["ping_emoji"])
await utils.answer(
message,