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" ), )