mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-09-06 12:06:45 +00:00
Add permission
This commit is contained in:
@ -1,6 +1,15 @@
|
||||
from aiocqhttp.message import unescape
|
||||
|
||||
import none
|
||||
from none import permissions as perm
|
||||
from none.helpers import send
|
||||
|
||||
|
||||
@none.on_command('echo', aliases=('say',))
|
||||
@none.on_command('echo')
|
||||
async def _(bot, ctx, session):
|
||||
await bot.send(ctx, session.arg)
|
||||
await send(bot, ctx, session.arg)
|
||||
|
||||
|
||||
@none.on_command('say', permission=perm.SUPERUSER)
|
||||
async def _(bot, ctx, session):
|
||||
await send(bot, ctx, unescape(session.arg))
|
||||
|
Reference in New Issue
Block a user