mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-16 01:40:15 +08:00
13 lines
414 B
Python
13 lines
414 B
Python
from astrbot.api.v1.components.command import CommandComponent
|
|
from astrbot.api.v1.event import AstrMessageEvent, filter
|
|
from astrbot.api.v1.context import Context
|
|
|
|
|
|
class HelloCommand(CommandComponent):
|
|
def __init__(self, context: Context):
|
|
super().__init__(context)
|
|
|
|
@filter.command("hello")
|
|
async def hello(self, event: AstrMessageEvent):
|
|
yield event.plain_result("Hello, Astrbot!")
|