Update test.py

pull/29/head
Who? 2024-12-02 00:51:26 +07:00 committed by GitHub
parent ec36b07ed9
commit 583b2a6155
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 13 deletions

View File

@ -11,8 +11,6 @@ import random
import time import time
import typing import typing
from io import BytesIO from io import BytesIO
import datetime
from time import strftime
from hikkatl.tl.types import Message from hikkatl.tl.types import Message
@ -379,23 +377,12 @@ class TestMod(loader.Module):
"""- Find out your userbot ping""" """- Find out your userbot ping"""
start = time.perf_counter_ns() start = time.perf_counter_ns()
message = await utils.answer(message, self.config["ping_emoji"]) message = await utils.answer(message, self.config["ping_emoji"])
now = datetime.datetime.today()
newyear_upt = datetime.datetime(int(strftime("%Y")) + 1, 1, 1)
summer_upt = datetime.datetime(int)strftime("%Y")) + 1, 6, 1)
halloween_upt = datetime.datetime(int(strftime("%Y")) + 1, 10, 30)
newyear_d = newyear_upt - now
summer_d = summer_upt - now
halloween_d = halloween_upt - now
await utils.answer( await utils.answer(
message, message,
self.config["Text_Of_Ping"].format( self.config["Text_Of_Ping"].format(
ping=round((time.perf_counter_ns() - start) / 10**6, 3), ping=round((time.perf_counter_ns() - start) / 10**6, 3),
uptime=utils.formatted_uptime(), uptime=utils.formatted_uptime(),
newyear=newyear_d.days,
summer=summer_d.days,
halloween=halloween_d.days,
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 ""
), ),