mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
properly trim file name
This commit is contained in:
parent
c6197ea9f4
commit
913dfa7153
1 changed files with 3 additions and 3 deletions
|
@ -978,7 +978,7 @@ class OtherCog(commands.Cog):
|
|||
"logger": logger,
|
||||
"format": _format or f"(bv*+ba/bv/ba/b)[filesize<={MAX_SIZE_MB}M]",
|
||||
"paths": paths,
|
||||
"outtmpl": f"{ctx.user.id}-%(title)s.%(ext)s",
|
||||
"outtmpl": f"{ctx.user.id}-%(title).50s.%(ext)s",
|
||||
"trim_file_name": 128,
|
||||
}
|
||||
) as downloader:
|
||||
|
@ -1004,10 +1004,10 @@ class OtherCog(commands.Cog):
|
|||
del logger
|
||||
files = []
|
||||
if upload_log:
|
||||
if (out_size := stdout.stat().st_size):
|
||||
if out_size := stdout.stat().st_size:
|
||||
files.append(discord.File(stdout, "stdout.txt"))
|
||||
BYTES_REMAINING -= out_size
|
||||
if (err_size := stderr.stat().st_size):
|
||||
if err_size := stderr.stat().st_size:
|
||||
files.append(discord.File(stderr, "stderr.txt"))
|
||||
BYTES_REMAINING -= err_size
|
||||
|
||||
|
|
Loading…
Reference in a new issue