fix for Embeds & ChatBlobs

This commit is contained in:
2022-04-15 19:41:38 +02:00
parent 6ac230e4c3
commit 0612b078a4
5 changed files with 9 additions and 7 deletions
@@ -122,7 +122,8 @@ class DiscordCommandHandler(BaseModule):
(r"<a href=skillid://\d+>(.+?)</a>", r'\1'),
('#', ''),
('&lt;', '<'),
('&gt;', '>')]:
('&gt;', '>'),
('</font>', '')]:
ctx = re.sub(pattern, sub, ctx)
cnt = 1
+2 -1
View File
@@ -184,7 +184,8 @@ class DiscordController:
elif type(msg) == ChatBlob:
if msg.embed:
msg: ChatBlob
blob = Embed(title=msg.title, color=0x00FF00, description=self.cmd.parseDiscord(msg.msg).replace("\n> ", '\n'))
blob = Embed(title=self.cmd.parseDiscord(f"{msg.page_prefix} {msg.title} {msg.page_postfix}"),
color=0x00FF00, description=self.cmd.parseDiscord(msg.msg).replace("\n> ", '\n'))
asyncio.run_coroutine_threadsafe(ch.send("", delete_after=del_after, embed=blob), self.loop)
return
rsp = self.cmd.parseDiscord(ctx.formatted_message.page_prefix) + "\n"