Moved the coloring from <color>[text]<end> to <color>[test]</color>, which allows the discord module to reparse the messages more accurately

This commit is contained in:
2022-04-29 20:12:15 +02:00
parent fcea02e1c9
commit 3cade228fe
22 changed files with 177 additions and 421 deletions
+3 -3
View File
@@ -53,11 +53,11 @@ class NotifyController:
logs = self.get_log(alts, limit or 20)
blob = ""
if len(logs) == 0:
return "No data for <highlight>%s<end> recorded." % char.name
return f"No data for <highlight>{char.name}</highlight> recorded."
for log in logs:
blob += f"<grey>[{self.util.format_datetime(log.time)}]</grey> <highlight>{log.name}<end> -> " \
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}<end> was last seen at " \
return f"<highlight>{char.name}</highlight> was last seen at " \
f"{self.util.format_date(logs[0].time)}. {self.text.format_page('More', blob)}"
def get_log(self, char_list, length=16):