MaiBot/src/plugin_system/base/base_event_plugin.py

19 lines
476 B
Python
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

from abc import ABC, abstractmethod
from typing import List, Dict, Type
class BaseEventsPlugin(ABC):
"""
事件触发型插件基类
所有事件触发型插件都应该继承这个基类而不是 BasePlugin
"""
@property
@abstractmethod
def plugin_name(self) -> str:
return "" # 插件内部标识符(如 "hello_world_plugin"
@property
@abstractmethod
def enable_plugin(self) -> bool:
return False