mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-28 00:31:14 +00:00
init version 2
This commit is contained in:
@ -1,13 +0,0 @@
|
||||
from nonebot import on_command, CommandSession, permission as perm
|
||||
from nonebot.message import unescape
|
||||
|
||||
|
||||
@on_command('echo')
|
||||
async def echo(session: CommandSession):
|
||||
await session.send(session.state.get('message') or session.current_arg)
|
||||
|
||||
|
||||
@on_command('say', permission=perm.SUPERUSER)
|
||||
async def say(session: CommandSession):
|
||||
await session.send(
|
||||
unescape(session.state.get('message') or session.current_arg))
|
Reference in New Issue
Block a user