bottleclip: More verbose filename
This commit is contained in:
parent
7011c67e2e
commit
677d4f1259
1 changed files with 4 additions and 1 deletions
5
main.py
5
main.py
|
@ -3,6 +3,7 @@
|
||||||
import asyncio
|
import asyncio
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
from os.path import splitext
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
|
||||||
import aiomqtt
|
import aiomqtt
|
||||||
|
@ -123,7 +124,9 @@ async def bottleclip(ctx, icon: str = "", ears: bool = False):
|
||||||
label = ctx.author.nick or ctx.author.global_name
|
label = ctx.author.nick or ctx.author.global_name
|
||||||
stl_file = clip.create_stl(label, icon, ears)
|
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)
|
await ctx.reply("Ok! Hier is je flessenclip", file=attach)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue