Potential fix for HTML formatting?

This commit is contained in:
Josh W 2024-07-12 23:29:41 -04:00
parent c29ae10978
commit e94241211b

View file

@ -67,7 +67,7 @@ class ChanceModule(Module):
f"{err_prelude}that's an invalid dice roll.",
reply_to=ctx.message,
message_type="m.text",
content_type="html",
content_type="html.raw",
)
raise CommandParserError("Invalid dice roll notation.")
@ -79,7 +79,7 @@ class ChanceModule(Module):
f"{err_prelude}I can only roll between 1 and 100 dice.",
reply_to=ctx.message,
message_type="m.text",
content_type="html",
content_type="html.raw",
)
raise CommandParserError("Can only roll between 1 and 100 dice.")
@ -89,7 +89,7 @@ class ChanceModule(Module):
f"{err_prelude}the dice can only have between 2 and 100 faces.",
reply_to=ctx.message,
message_type="m.text",
content_type="html",
content_type="html.raw",
)
raise CommandParserError("Dice must have between 2 and 100 faces.")
@ -106,7 +106,7 @@ class ChanceModule(Module):
),
reply_to=ctx.message,
message_type="m.text",
content_type="html",
content_type="html.raw",
)
raise CommandParserError("Invalid dice roll modifier.")
if dice_parts[2] is not None:
@ -120,7 +120,7 @@ class ChanceModule(Module):
),
reply_to=ctx.message,
message_type="m.text",
content_type="html",
content_type="html.raw",
)
raise CommandParserError("Modifier must be between 1 and 1000000.")
@ -129,7 +129,7 @@ class ChanceModule(Module):
ctx.room,
f"<em>{choice(_DICE_LOCATIONS)}</em>",
message_type="m.emote",
content_type="html",
content_type="html.raw",
)
await asyncio.sleep(1)
@ -139,7 +139,7 @@ class ChanceModule(Module):
ctx.room,
f"{choice(_DICE_EXCLAMATIONS)}",
message_type="m.text",
content_type="html",
content_type="html.raw",
)
await asyncio.sleep(1)
@ -176,7 +176,7 @@ class ChanceModule(Module):
),
reply_to=ctx.message,
message_type="m.emote",
content_type="html",
content_type="html.raw",
)
else:
# html_sender = format_mention(ctx.message.sender)
@ -188,5 +188,5 @@ class ChanceModule(Module):
),
reply_to=ctx.message,
message_type="m.emote",
content_type="html",
content_type="html.raw",
)