From 42c07543f240fa360f556f9a1d7553d35ee016a7 Mon Sep 17 00:00:00 2001 From: ajax146 <31014239+ajax146@users.noreply.github.com> Date: Fri, 5 Jun 2026 06:28:37 -0700 Subject: [PATCH] Add pinging members functionality to /factoid call --- techsupport_bot/commands/factoids.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/techsupport_bot/commands/factoids.py b/techsupport_bot/commands/factoids.py index 5490f7f6d..0cd31121e 100644 --- a/techsupport_bot/commands/factoids.py +++ b/techsupport_bot/commands/factoids.py @@ -982,13 +982,17 @@ async def send_to_logger( }, ) async def factoid_call_command( - self: Self, interaction: discord.Interaction, factoid_name: str + self: Self, + interaction: discord.Interaction, + factoid_name: str, + member_to_ping: discord.Member = None, ) -> None: """This is an app command version of typing {prefix}call Args: interaction (discord.Interaction): The interaction that triggered this command factoid_name (str): The factoid name to search for and print + member_to_ping (discord.Member): A member to ping in the output Raises: TooLongFactoidMessageError: If the plaintext exceed 2000 characters @@ -1055,6 +1059,9 @@ async def factoid_call_command( # The not embed causes a ValueError in certain cases. This ensures fallback works content = factoid.message + if member_to_ping: + content = f"{member_to_ping.mention} {content}".strip() + if content and len(content) > 2000: embed = auxiliary.prepare_deny_embed( message="I ran into an error sending that factoid: "