mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-29 00:25:58 +08:00
11 lines
254 B
Python
11 lines
254 B
Python
|
from command import CommandRegistry
|
||
|
from commands import core
|
||
|
|
||
|
__registry__ = cr = CommandRegistry()
|
||
|
|
||
|
|
||
|
@cr.register('test')
|
||
|
@cr.restrict(full_command_only=True, superuser_only=True)
|
||
|
def test(_, ctx_msg):
|
||
|
core.echo('Your are the superuser!', ctx_msg)
|