chore: remove unused steering docs and update point settings model

This commit is contained in:
2025-10-16 00:52:05 +08:00
parent 26273a4afc
commit 55d3b31146
58 changed files with 2491 additions and 3480 deletions

View File

@@ -259,7 +259,7 @@ export function executeActions(
// 更新冷却时间
runtimeState.lastExecutionTime[action.id] = Date.now()
const sendAction = async () => sendAndLogDanmaku(handlers.sendLiveDanmaku!, action, roomId, message)
const sendAction = async () => sendAndLogDanmaku(handlers.sendLiveDanmaku, action, roomId, message)
// 延迟发送
if (action.actionConfig.delaySeconds && action.actionConfig.delaySeconds > 0) {
@@ -285,7 +285,7 @@ export function executeActions(
runtimeState.lastExecutionTime[action.id] = Date.now()
const sendPmPromise = async (uid: number, msg: string) => {
return handlers.sendPrivateMessage!(uid, msg)
return handlers.sendPrivateMessage(uid, msg)
.then((success) => {
// 记录私信发送历史
logPrivateMsgHistory(

View File

@@ -1,6 +1,6 @@
import type {
AutoActionItem,
RuntimeState
RuntimeState,
} from './autoAction/types.js'
import type { EventModel } from '@/api/api-models.js'
import { useIDBKeyval } from '@vueuse/integrations/useIDBKeyval'
@@ -141,7 +141,7 @@ export const useAutoAction = defineStore('autoAction', () => {
runtimeState.value.lastExecutionTime[actionToExecute.id] = Date.now()
if (actionToExecute.actionConfig.delaySeconds && actionToExecute.actionConfig.delaySeconds > 0) {
setTimeout(() => {
biliFunc.sendLiveDanmaku(roomId.value!, formattedContent).catch(err => console.error('[AutoAction] 发送弹幕失败:', err))
biliFunc.sendLiveDanmaku(roomId.value, formattedContent).catch(err => console.error('[AutoAction] 发送弹幕失败:', err))
}, actionToExecute.actionConfig.delaySeconds * 1000)
} else {
biliFunc.sendLiveDanmaku(roomId.value, formattedContent).catch(err => console.error('[AutoAction] 发送弹幕失败:', err))
@@ -251,7 +251,7 @@ export const useAutoAction = defineStore('autoAction', () => {
runtimeState.value.lastExecutionTime[currentAction.id] = Date.now()
if (currentAction.actionConfig.delaySeconds && currentAction.actionConfig.delaySeconds > 0) {
setTimeout(() => {
biliFunc.sendLiveDanmaku(roomId.value!, formattedContent).catch(err => console.error('[AutoAction] 发送弹幕失败:', err))
biliFunc.sendLiveDanmaku(roomId.value, formattedContent).catch(err => console.error('[AutoAction] 发送弹幕失败:', err))
}, currentAction.actionConfig.delaySeconds * 1000)
} else {
biliFunc.sendLiveDanmaku(roomId.value, formattedContent).catch(err => console.error('[AutoAction] 发送弹幕失败:', err))
@@ -705,7 +705,7 @@ export const useAutoAction = defineStore('autoAction', () => {
if (action.actionConfig.delaySeconds && action.actionConfig.delaySeconds > 0) {
console.log(`[定时任务测试] 将在 ${action.actionConfig.delaySeconds} 秒后发送弹幕`)
setTimeout(() => {
biliFunc.sendLiveDanmaku(roomId.value!, formattedContent)
biliFunc.sendLiveDanmaku(roomId.value, formattedContent)
.catch(err => console.error('[AutoAction] 发送弹幕失败:', err))
}, action.actionConfig.delaySeconds * 1000)
} else {

View File

@@ -21,7 +21,7 @@ export class StoreTarget<T> {
if (result === undefined && this.defaultValue !== undefined) {
await this.set(this.defaultValue)
return this.defaultValue as T
return this.defaultValue
}
return result
}