From 4d638c971ff8ff35f2f2d7fc3dfd75d11ef148d7 Mon Sep 17 00:00:00 2001 From: ajax146 <31014239+ajax146@users.noreply.github.com> Date: Mon, 5 May 2025 19:59:21 -0400 Subject: [PATCH 1/2] Changes the name of factoid json to match input --- techsupport_bot/commands/factoids.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/techsupport_bot/commands/factoids.py b/techsupport_bot/commands/factoids.py index 07ac00e7..4e30e6e6 100644 --- a/techsupport_bot/commands/factoids.py +++ b/techsupport_bot/commands/factoids.py @@ -1555,8 +1555,6 @@ async def _json(self: Self, ctx: commands.Context, factoid_name: str) -> None: factoid = await self.get_factoid(factoid_name, str(ctx.guild.id)) - aliases_list = await self.get_list_of_aliases(factoid_name, str(ctx.guild.id)) - if not factoid.embed_config: await auxiliary.send_deny_embed( message=f"There is no embed config for `{factoid_name}`", @@ -1569,7 +1567,7 @@ async def _json(self: Self, ctx: commands.Context, factoid_name: str) -> None: json_file = discord.File( io.StringIO(formatted), filename=( - f"{aliases_list[0]}-factoid-embed-config-{datetime.datetime.utcnow()}.json" + f"{factoid_name}-factoid-embed-config-{datetime.datetime.utcnow()}.json" ), ) From c15f3d41300878215a01957e666102ee357a7f9b Mon Sep 17 00:00:00 2001 From: ajax146 <31014239+ajax146@users.noreply.github.com> Date: Mon, 5 May 2025 20:01:26 -0400 Subject: [PATCH 2/2] Add a to lower --- techsupport_bot/commands/factoids.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/techsupport_bot/commands/factoids.py b/techsupport_bot/commands/factoids.py index 4e30e6e6..14b0910a 100644 --- a/techsupport_bot/commands/factoids.py +++ b/techsupport_bot/commands/factoids.py @@ -1567,7 +1567,7 @@ async def _json(self: Self, ctx: commands.Context, factoid_name: str) -> None: json_file = discord.File( io.StringIO(formatted), filename=( - f"{factoid_name}-factoid-embed-config-{datetime.datetime.utcnow()}.json" + f"{factoid_name.lower()}-factoid-embed-config-{datetime.datetime.utcnow()}.json" ), )