优化管理员帮助,超级用户帮助图片,重新移植gamedraw,修复pil帮助私聊时无法生成

This commit is contained in:
HibiKier
2022-12-24 00:16:17 +08:00
parent 0dc11b7edb
commit b25b9ca928
33 changed files with 869 additions and 695 deletions
+5 -8
View File
@@ -1,18 +1,15 @@
from nonebot import on_command
from nonebot.permission import SUPERUSER
from nonebot.rule import to_me
from configs.path_config import IMAGE_PATH
from utils.message_builder import image
from .data_source import create_help_image
from .data_source import create_help_image, SUPERUSER_HELP_IMAGE
__zx_plugin_name__ = '超级用户帮助 [Superuser]'
superuser_help_image = IMAGE_PATH / 'superuser_help.png'
if superuser_help_image.exists():
superuser_help_image.unlink()
if SUPERUSER_HELP_IMAGE.exists():
SUPERUSER_HELP_IMAGE.unlink()
super_help = on_command(
"超级用户帮助", rule=to_me(), priority=1, permission=SUPERUSER, block=True
@@ -21,7 +18,7 @@ super_help = on_command(
@super_help.handle()
async def _():
if not superuser_help_image.exists():
if not SUPERUSER_HELP_IMAGE.exists():
await create_help_image()
x = image(superuser_help_image)
x = image(SUPERUSER_HELP_IMAGE)
await super_help.finish(x)