Update test.py

pull/2/head
Who? 2024-09-29 00:50:45 +07:00 committed by GitHub
parent 3275f6f8e4
commit 3ce9c2a72b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 13 deletions

View File

@ -338,18 +338,10 @@ class TestMod(loader.Module):
start = time.perf_counter_ns() start = time.perf_counter_ns()
message = await utils.answer(message, "🌘") message = await utils.answer(message, "🌘")
await utils.answer( if message.sender.premium == False:
message, await utils.answer(message, self.strings["noprem_ping"].format(round((time.perf_counter_ns() - start) / 10**6, 3), utils.formatted_uptime(),))
self.strings("results_ping").format( else:
round((time.perf_counter_ns() - start) / 10**6, 3), await utils.answer(message, self.strings("results_ping").format(round((time.perf_counter_ns() - start) / 10**6, 3), utils.formatted_uptime(),))
utils.formatted_uptime(),
)
+ (
("\n\n" + self.strings("ping_hint"))
if random.choice([0, 0, 1]) == 1
else ""
),
)
async def client_ready(self): async def client_ready(self):
chat, _ = await utils.asset_channel( chat, _ = await utils.asset_channel(
@ -366,4 +358,4 @@ class TestMod(loader.Module):
logging.getLogger().handlers[0].install_tg_log(self) logging.getLogger().handlers[0].install_tg_log(self)
logger.debug("Bot logging installed for %s", self.logchat) logger.debug("Bot logging installed for %s", self.logchat)
self._pass_config_to_logger() self._pass_config_to_logger()