Files
konabot/konabot/plugins/image_process/__init__.py
2025-10-12 11:50:15 +08:00

14 lines
421 B
Python

from nonebot import on_message
from nonebot.adapters import Bot
from konabot.common.nb.extract_image import PIL_Image
from konabot.common.nb.match_keyword import match_keyword
from konabot.common.nb.reply_image import reply_image
cmd_black_white = on_message(rule=match_keyword("黑白"))
@cmd_black_white.handle()
async def _(img: PIL_Image, bot: Bot):
await reply_image(cmd_black_white, bot, img.convert("LA"))