Skip to content

Commit 6de4792

Browse files
authored
Rename factoid json file (#1270)
1 parent bb8000a commit 6de4792

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

techsupport_bot/commands/factoids.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1443,6 +1443,8 @@ async def _json(self: Self, ctx: commands.Context, factoid_name: str) -> None:
14431443

14441444
factoid = await self.get_factoid(factoid_name, str(ctx.guild.id))
14451445

1446+
aliases_list = await self.get_list_of_aliases(factoid_name, str(ctx.guild.id))
1447+
14461448
if not factoid.embed_config:
14471449
await auxiliary.send_deny_embed(
14481450
message=f"There is no embed config for `{factoid_name}`",
@@ -1455,7 +1457,7 @@ async def _json(self: Self, ctx: commands.Context, factoid_name: str) -> None:
14551457
json_file = discord.File(
14561458
io.StringIO(formatted),
14571459
filename=(
1458-
f"{factoid.name}-factoid-embed-config-{datetime.datetime.utcnow()}.json"
1460+
f"{aliases_list[0]}-factoid-embed-config-{datetime.datetime.utcnow()}.json"
14591461
),
14601462
)
14611463

0 commit comments

Comments
 (0)