Update main.py

This commit is contained in:
Soulter 2024-07-26 17:15:20 +08:00 committed by GitHub
parent 7a991417e2
commit 05c31a17ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,7 +23,10 @@ class HelloWorldPlugin:
self.context.register_commands("helloworld", "helloworld", "内置测试指令。", 1, self.helloworld) self.context.register_commands("helloworld", "helloworld", "内置测试指令。", 1, self.helloworld)
""" """
机器人程序会调用此函数 指令处理函数
- 需要接收两个参数message: AstrMessageEvent, context: Context
- 返回 CommandResult 对象
""" """
def helloworld(self, message: AstrMessageEvent, context: Context): def helloworld(self, message: AstrMessageEvent, context: Context):
return CommandResult().message("Hello, World!") return CommandResult().message("Hello, World!")