bottleclip: More verbose filename

This commit is contained in:
polyfloyd 2025-05-09 17:50:57 +02:00
parent 7011c67e2e
commit 677d4f1259

View file

@ -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)