mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-05-16 13:55:28 +08:00
add ModuleType Schema
This commit is contained in:
@@ -7,6 +7,7 @@ from app.log import logger
|
||||
from app.modules import _ModuleBase, _MessageBase
|
||||
from app.modules.telegram.telegram import Telegram
|
||||
from app.schemas import MessageChannel, CommingMessage, Notification
|
||||
from app.schemas.types import ModuleType
|
||||
|
||||
|
||||
class TelegramModule(_ModuleBase, _MessageBase[Telegram]):
|
||||
@@ -22,6 +23,13 @@ class TelegramModule(_ModuleBase, _MessageBase[Telegram]):
|
||||
def get_name() -> str:
|
||||
return "Telegram"
|
||||
|
||||
@staticmethod
|
||||
def get_type() -> ModuleType:
|
||||
"""
|
||||
获取模块类型
|
||||
"""
|
||||
return ModuleType.Notification
|
||||
|
||||
def stop(self):
|
||||
"""
|
||||
停止模块
|
||||
|
||||
Reference in New Issue
Block a user