finish typing change

This commit is contained in:
yanyongyu
2020-12-17 21:09:30 +08:00
parent 6bd69e6708
commit 799144e64d
19 changed files with 309 additions and 315 deletions

View File

@ -1,18 +1,18 @@
from nonebot.rule import to_me
from nonebot.typing import State
from nonebot.typing import T_State
from nonebot.plugin import on_startswith
from nonebot.permission import GROUP_ADMIN
from nonebot.adapters.ding import Bot as DingBot, Event as DingEvent
from nonebot.adapters.cqhttp import Bot as CQHTTPBot, Event as CQHTTPEvent
from nonebot.permission import SUPERUSER
from nonebot.adapters.ding import Bot as DingBot
from nonebot.adapters.cqhttp import Bot as CQHTTPBot
test_command = on_startswith("hello", to_me(), permission=GROUP_ADMIN)
test_command = on_startswith("hello", to_me(), permission=SUPERUSER)
@test_command.handle()
async def test_handler(bot: CQHTTPBot, event: CQHTTPEvent, state: State):
async def test_handler(bot: CQHTTPBot):
await test_command.finish("cqhttp hello")
@test_command.handle()
async def test_handler(bot: DingBot, event: DingEvent, state: State):
async def test_handler(bot: DingBot):
await test_command.finish("ding hello")