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
+2 -2
View File
@@ -1,6 +1,7 @@
import time
from core.buddy_service import BuddyService
from core.chat_blob import ChatBlob
from core.command_param_types import Character, Int
from core.decorators import event, instance, command
from core.logger import Logger
@@ -57,8 +58,7 @@ class NotifyController:
for log in logs:
blob += f"<grey>[{self.util.format_datetime(log.time)}]</grey> <highlight>{log.name}</highlight> -> " \
f"{'<green>logged on</green>' if log.status == 1 else '<red>logged off</red>'}.\n"
return f"<highlight>{char.name}</highlight> was last seen at " \
f"{self.util.format_date(logs[0].time)}. {self.text.format_page('More', blob)}"
return ChatBlob("More", blob, prefix=f"<highlight>{char.name}</highlight> was last seen at {self.util.format_date(logs[0].time)}. [", suffix="]")
def get_log(self, char_list, length=16):
query = "SELECT n.*, p.name as name FROM notify_log n LEFT JOIN player p on n.char_id = p.char_id "