mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 15:38:19 +08:00
fix actions
This commit is contained in:
@@ -2,7 +2,7 @@ from typing import List, Optional, Union
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
from app.actions import BaseAction
|
||||
from app.actions import BaseAction, ActionChain
|
||||
from app.schemas import ActionParams, ActionContext, MessageChannel
|
||||
|
||||
|
||||
@@ -19,6 +19,10 @@ class SendMessageAction(BaseAction):
|
||||
发送消息
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.chain = ActionChain()
|
||||
|
||||
@property
|
||||
def name(self) -> str:
|
||||
return "发送消息"
|
||||
@@ -27,6 +31,10 @@ class SendMessageAction(BaseAction):
|
||||
def description(self) -> str:
|
||||
return "发送特定消息"
|
||||
|
||||
@property
|
||||
def data(self) -> dict:
|
||||
return SendMessageParams().dict()
|
||||
|
||||
@property
|
||||
def success(self) -> bool:
|
||||
return self.done
|
||||
|
||||
Reference in New Issue
Block a user