feat: person_message和group_message的事件钩子

This commit is contained in:
Rock Chin
2023-01-13 23:13:54 +08:00
parent 4232ab6f47
commit da5b1cf3fa
4 changed files with 70 additions and 4 deletions

View File

@@ -91,3 +91,11 @@ class PluginHost:
def get_runtime_context(self) -> context:
"""获取运行时上下文"""
return context
def get_bot(self):
"""获取机器人对象"""
return context.get_qqbot_manager().bot
def notify_admin(self, message):
"""通知管理员"""
context.get_qqbot_manager().notify_admin(message)