From 6eac51633dac037e854df85753ac0cbb2d91692b Mon Sep 17 00:00:00 2001 From: ajax146 <31014239+ajax146@users.noreply.github.com> Date: Thu, 24 Apr 2025 12:37:32 -0400 Subject: [PATCH] Rename factoid json file --- techsupport_bot/commands/factoids.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/techsupport_bot/commands/factoids.py b/techsupport_bot/commands/factoids.py index d2e489a2..e63fbfc0 100644 --- a/techsupport_bot/commands/factoids.py +++ b/techsupport_bot/commands/factoids.py @@ -1444,6 +1444,8 @@ 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}`", @@ -1456,7 +1458,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"{aliases_list[0]}-factoid-embed-config-{datetime.datetime.utcnow()}.json" ), )