fixed a bug in the discord account getter

fixed !lastseen on discord, aswell as multi-page responses
This commit is contained in:
2022-05-14 17:39:18 +02:00
parent 72ccd475af
commit e942ac43fa
7 changed files with 17 additions and 12 deletions
+7 -1
View File
@@ -5,7 +5,7 @@ from datetime import datetime
import pytz
from core.chat_blob import ChatBlob
from core.command_param_types import Any, Const
from core.command_param_types import Any, Const, Int
from core.decorators import instance, command
@@ -50,6 +50,12 @@ class TimeController:
return f"Currently its {now.hour:02}:{now.minute:02}:{now.second:02} " \
f"{calendar.month_name[now.month]} {day}, {now.year + 27474} Rubi-Ka Universal Time."
@command(command="time", params=[Int("timestamp")], access_level="member",
description="Show UTC time of the provided timestamp")
def timestamp_cmd(self, _, t: int):
d = datetime.fromtimestamp(t, pytz.utc)
return f"Your provided timestamp resolves to: <highlight>{d.strftime(self.time_format)}</highlight>"
@command(command="time", params=[Any("timezone")], access_level="member",
description="Show time for the specified timezone")
def time_zone_cmd(self, _, timezone_str):