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
+1 -1
View File
@@ -57,7 +57,7 @@ class Text:
self.bot = registry.get_instance("bot")
self.public_channel_service = registry.get_instance("public_channel_service")
def make_chatcmd(self, name, msg, style=""):
def make_chatcmd(self, name: str, msg: str, style: str = "") -> str:
msg = msg.strip()
msg = msg.replace("'", "&#39;")
return f"<a {style} href='chatcmd://{msg}'>{name}</a>"