2.1.2 • Published 1 year ago

koishi-schedule-send v2.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

koishi-schedule-send

编写自动发送消息的 Koishi 插件框架。

编写插件

export class Config {
  @SchemaProperty()
  message: string;
}

// 在这里不用写任何东西
@DefinePlugin()
export default class TestSendPlugin extends SchedulePlugin(Config) {
  async send() {
    return this.config.message;
  }
}

配置

配置会自动从插件工厂函数中混入,下面为配置。其中 targetskoishi-target-def 的定义。

间隔定义有 cron interval randomInterval 三种,可以自由组合使用。

cron: '18 13 * * * *' # cron 语法
interval: 30000 # 固定间隔
randomInterval: # 随机间隔
  min: 5000
  max: 10000
immediate: false # 是否立即发送
targets:
  - bot: 'onebot:1111111111'
    channels:
      - channelId: '222222222'
2.1.2

1 year ago

2.1.1

2 years ago

2.1.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

2.0.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago