mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-20 02:26:32 +01:00
Limit file name lengths
This commit is contained in:
parent
432e9007be
commit
cdbe8c15ba
1 changed files with 10 additions and 9 deletions
|
@ -813,7 +813,7 @@ class OtherCog(commands.Cog):
|
||||||
f"\\* URL: <{friendly_url}>\n"
|
f"\\* URL: <{friendly_url}>\n"
|
||||||
f"\\* Load time: {fetch_time:.2f}ms\n"
|
f"\\* Load time: {fetch_time:.2f}ms\n"
|
||||||
f"\\* Screenshot render time: {screenshot_time:.2f}ms\n"
|
f"\\* Screenshot render time: {screenshot_time:.2f}ms\n"
|
||||||
f"\\* Total time: {(fetch_time + screenshot_time):.2f}ms\n" +
|
f"\\* Total time: {(fetch_time + screenshot_time):.2f}ms\n"
|
||||||
(
|
(
|
||||||
'* Probability of being scat or something else horrifying: 100%'
|
'* Probability of being scat or something else horrifying: 100%'
|
||||||
if ctx.user.id == 1019233057519177778 else ''
|
if ctx.user.id == 1019233057519177778 else ''
|
||||||
|
@ -978,7 +978,8 @@ class OtherCog(commands.Cog):
|
||||||
"logger": logger,
|
"logger": logger,
|
||||||
"format": _format or f"(bv*+ba/bv/ba/b)[filesize<={MAX_SIZE_MB}M]",
|
"format": _format or f"(bv*+ba/bv/ba/b)[filesize<={MAX_SIZE_MB}M]",
|
||||||
"paths": paths,
|
"paths": paths,
|
||||||
"outtmpl": f"{ctx.user.id}-%(title)s.%(ext)s"
|
"outtmpl": f"{ctx.user.id}-%(title)s.%(ext)s",
|
||||||
|
"trim_file_name": 128,
|
||||||
}
|
}
|
||||||
) as downloader:
|
) as downloader:
|
||||||
try:
|
try:
|
||||||
|
@ -1209,7 +1210,7 @@ class OtherCog(commands.Cog):
|
||||||
try:
|
try:
|
||||||
mp3, size = await asyncio.wait_for(
|
mp3, size = await asyncio.wait_for(
|
||||||
_bot.loop.run_in_executor(None, _convert, text_pre),
|
_bot.loop.run_in_executor(None, _convert, text_pre),
|
||||||
timeout=300
|
timeout=600
|
||||||
)
|
)
|
||||||
except asyncio.TimeoutError:
|
except asyncio.TimeoutError:
|
||||||
task.cancel()
|
task.cancel()
|
||||||
|
|
Loading…
Reference in a new issue