Potential fix for HTML formatting?
This commit is contained in:
parent
c29ae10978
commit
e94241211b
1 changed files with 9 additions and 9 deletions
|
@ -67,7 +67,7 @@ class ChanceModule(Module):
|
||||||
f"{err_prelude}that's an invalid dice roll.",
|
f"{err_prelude}that's an invalid dice roll.",
|
||||||
reply_to=ctx.message,
|
reply_to=ctx.message,
|
||||||
message_type="m.text",
|
message_type="m.text",
|
||||||
content_type="html",
|
content_type="html.raw",
|
||||||
)
|
)
|
||||||
raise CommandParserError("Invalid dice roll notation.")
|
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.",
|
f"{err_prelude}I can only roll between 1 and 100 dice.",
|
||||||
reply_to=ctx.message,
|
reply_to=ctx.message,
|
||||||
message_type="m.text",
|
message_type="m.text",
|
||||||
content_type="html",
|
content_type="html.raw",
|
||||||
)
|
)
|
||||||
raise CommandParserError("Can only roll between 1 and 100 dice.")
|
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.",
|
f"{err_prelude}the dice can only have between 2 and 100 faces.",
|
||||||
reply_to=ctx.message,
|
reply_to=ctx.message,
|
||||||
message_type="m.text",
|
message_type="m.text",
|
||||||
content_type="html",
|
content_type="html.raw",
|
||||||
)
|
)
|
||||||
raise CommandParserError("Dice must have between 2 and 100 faces.")
|
raise CommandParserError("Dice must have between 2 and 100 faces.")
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ class ChanceModule(Module):
|
||||||
),
|
),
|
||||||
reply_to=ctx.message,
|
reply_to=ctx.message,
|
||||||
message_type="m.text",
|
message_type="m.text",
|
||||||
content_type="html",
|
content_type="html.raw",
|
||||||
)
|
)
|
||||||
raise CommandParserError("Invalid dice roll modifier.")
|
raise CommandParserError("Invalid dice roll modifier.")
|
||||||
if dice_parts[2] is not None:
|
if dice_parts[2] is not None:
|
||||||
|
@ -120,7 +120,7 @@ class ChanceModule(Module):
|
||||||
),
|
),
|
||||||
reply_to=ctx.message,
|
reply_to=ctx.message,
|
||||||
message_type="m.text",
|
message_type="m.text",
|
||||||
content_type="html",
|
content_type="html.raw",
|
||||||
)
|
)
|
||||||
raise CommandParserError("Modifier must be between 1 and 1000000.")
|
raise CommandParserError("Modifier must be between 1 and 1000000.")
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ class ChanceModule(Module):
|
||||||
ctx.room,
|
ctx.room,
|
||||||
f"<em>{choice(_DICE_LOCATIONS)}</em>",
|
f"<em>{choice(_DICE_LOCATIONS)}</em>",
|
||||||
message_type="m.emote",
|
message_type="m.emote",
|
||||||
content_type="html",
|
content_type="html.raw",
|
||||||
)
|
)
|
||||||
|
|
||||||
await asyncio.sleep(1)
|
await asyncio.sleep(1)
|
||||||
|
@ -139,7 +139,7 @@ class ChanceModule(Module):
|
||||||
ctx.room,
|
ctx.room,
|
||||||
f"{choice(_DICE_EXCLAMATIONS)}",
|
f"{choice(_DICE_EXCLAMATIONS)}",
|
||||||
message_type="m.text",
|
message_type="m.text",
|
||||||
content_type="html",
|
content_type="html.raw",
|
||||||
)
|
)
|
||||||
|
|
||||||
await asyncio.sleep(1)
|
await asyncio.sleep(1)
|
||||||
|
@ -176,7 +176,7 @@ class ChanceModule(Module):
|
||||||
),
|
),
|
||||||
reply_to=ctx.message,
|
reply_to=ctx.message,
|
||||||
message_type="m.emote",
|
message_type="m.emote",
|
||||||
content_type="html",
|
content_type="html.raw",
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
# html_sender = format_mention(ctx.message.sender)
|
# html_sender = format_mention(ctx.message.sender)
|
||||||
|
@ -188,5 +188,5 @@ class ChanceModule(Module):
|
||||||
),
|
),
|
||||||
reply_to=ctx.message,
|
reply_to=ctx.message,
|
||||||
message_type="m.emote",
|
message_type="m.emote",
|
||||||
content_type="html",
|
content_type="html.raw",
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue