添加安全限制

This commit is contained in:
2025-10-12 13:40:40 +08:00
parent 87be1916ee
commit 627a48da1c

View File

@ -31,6 +31,8 @@ async def _(
raise BotExceptionMessage("时长太短或帧率太小,没有帧被渲染")
if fps_ * duration_ > 100:
raise BotExceptionMessage("太多帧啦!试着缩短一点时间吧!")
if width_ > 640 or height_ > 640:
raise BotExceptionMessage("最大支持 640x640 啦!不要太大啦!")
code = code.strip("\"").strip("'")