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)