新增 marchtoy #70

Merged
Passthem merged 15 commits from bkbkzzzz/konabot:marchtoy_gl into master 2026-04-27 02:42:19 +08:00
17 changed files with 1875 additions and 1066 deletions
Showing only changes of commit 6a68db70f5 - Show all commits

View File

@ -4,11 +4,11 @@ from nonebot_plugin_alconna import UniMessage
from nonebot.params import CommandArg
import konabot.plugins.marchtoy.gl_render as render
import io
cmd_marchtoy = on_command("march", priority=10, block=True)
cmd_marchtoy = on_command("march")
@cmd_marchtoy.handle()
async def _(args: Message = CommandArg()):
if cmd := args.extract_plain_text():
img = await render.render(cmd, 256, 256)
img = await render.render(cmd, (256, 256))
buffer = io.BytesIO()
img.save(buffer, format="PNG")
buffer.seek(0)