release: public alpha 0.6.0 baseline
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
"""Minimal command extension using only the public JWeBot SDK."""
|
||||
|
||||
from jwebot_sdk import Event, ExtensionResult, ReplyPlan, SingleGroupContext
|
||||
|
||||
|
||||
def handle_hello(event: Event, arguments: str) -> ExtensionResult:
|
||||
suffix = f" {arguments}" if arguments else ""
|
||||
return ExtensionResult(
|
||||
reply=ReplyPlan.text(f"hello {event.sender}{suffix}"),
|
||||
metadata={"extension": "hello-command"},
|
||||
)
|
||||
|
||||
|
||||
def plugin(context: SingleGroupContext) -> None:
|
||||
context.commands.register("/hello", handle_hello)
|
||||
|
||||
Reference in New Issue
Block a user