From 677d4f1259f6c55a4c150bf238e2378c42e52a9a Mon Sep 17 00:00:00 2001 From: polyfloyd Date: Fri, 9 May 2025 17:50:57 +0200 Subject: [PATCH] bottleclip: More verbose filename --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index d9dc6a8..6020168 100755 --- a/main.py +++ b/main.py @@ -3,6 +3,7 @@ import asyncio import os import sys +from os.path import splitext from time import sleep import aiomqtt @@ -123,7 +124,9 @@ async def bottleclip(ctx, icon: str = "", ears: bool = False): label = ctx.author.nick or ctx.author.global_name stl_file = clip.create_stl(label, icon, ears) - attach = File(stl_file.name, filename=f"{label}.stl") + icon_name, _ = splitext(icon) + with_ears = '_ears' if ears else '' + attach = File(stl_file.name, filename=f"{label}_{icon_name}{with_ears}.stl") await ctx.reply("Ok! Hier is je flessenclip", file=attach)