Donation Alerts Integrate

模组

· 作者 Folleach

一个允许你接收来自 DonationAlerts 事件的模组

0 本站下载 0 关注 更新于 3 年前

最新 2.0.3-1.20.1 · 1.20.1 · Fabric

一键开服(送7天)

DonationAlerts-Minecraft

一个允许您接收 DonationAlerts 事件的模组。

支持:

  • 捐赠
  • Twitch Bits(Twitch 积分)
  • Twitch Points(Twitch 点数)
  • YouTube 和 Twitch 订阅

功能包括:

  • 向聊天发送消息
  • 执行任何 Minecraft 命令(包括模组命令)

设置

设置您的令牌 (Token)

您可以通过以下几种方式设置令牌。

使用 Minecraft 命令

  1. 从 DonationAlerts 服务复制令牌到剪贴板
  2. 在您的 Minecraft 聊天中执行命令
    /da set
    
    无需 将令牌插入聊天!令牌将从您的剪贴板获取。

使用文件

  1. 打开文件
    Windows: C:\Users\<your user>\.donation-alerts-token
    Linux: ~/.donation-alerts-token
  2. 将您的令牌粘贴到文件中
  3. 保存

连接到 Donation Alerts

要连接到 Donation Alerts,请使用 Minecraft 中的命令

/da connect

要检查连接状态,您可以使用命令

/da status

以及断开连接的命令

/da disconnect

配置

设置文件位于 .minecraft/donation-alerts-integrate/settings.yaml
文件格式为 yaml,示例如下:

disableSettingsUpdateMessage: false
disableWelcomeMessage: false
triggers:
- name: default
  description: 示例触发器
  isActive: true
  sensitives:
  - properties:
      type: daintegrate/sensitive/donate
      value:
        from: 5
        to: 10
        currency: USD
  handlers:
  - delay: 0 # 您可以在这里输入任何注释!
    properties:
      type: daintegrate/handler/message
      value:
        message: Hello, <donation_username>! This is an example message for all events from Donation Alerts
  - delay: 10
    properties:
      type: daintegrate/handler/command
      value:
        command: time set day # The sun is rising
- name: Subscribtion
  isActive: true
  sensitives:
  - properties:
      type: daintegrate/sensitive/subscribe
      value:
        type: YouTubeSubscription
  handlers:
  - properties:
      type: daintegrate/handler/message
      value:
        message: <donation_username> just subscribe to YouTube!

triggers 是一个事件列表,可由来自 Donation Alerts 的每条消息触发。

属性 描述
name 触发器的名称
description 触发器的描述
isActive 启用或禁用触发器。
如果 isActive = false,则不会激活该触发器
sensitive 触发激活的条件
参见 #Sensitive 以了解更多
handlers 触发器内的处理程序,执行任何已注册的命令。
您可以创建自己的模组以添加自定义处理程序
参见 #Handlers 以了解更多

Sensitive(敏感条件)

触发激活的条件。
DonationAlertsIntegrate 提供多种敏感条件类型。

类型 描述
daintegrate/sensitive/always 对任何事件激活
daintegrate/sensitive/donate 对特定捐赠激活
daintegrate/sensitive/subscribe 对订阅激活
daintegrate/sensitive/twitch/bits 对特定 Bits 激活

Always(总是)

参数

无参数

示例
sensitives:
- properties:
    type: daintegrate/sensitive/always

Donate(捐赠)

如果金额落在指定范围内 (from <= 金额 <= to) 且货币匹配,则激活。

参数
名称 类型 描述
from number 左侧数值
to number 右侧数值
currency text ISO 4217 代码中的货币
示例
sensitives:
- properties:
    type: daintegrate/sensitive/donate
    value:
      from: 5
      to: 10
      currency: USD

Subscribe(订阅)

如果 type 匹配,则激活。

参数
名称 类型 描述
type enum 要匹配的類型,可用類型见下文
可用类型
  • YouTubeSubscription
  • TwitchSubscription
  • TwitchFreeFollow
  • TwitchGiftSubscription
  • TwitchPrimeSubscription
示例
sensitives:
- properties:
    type: daintegrate/sensitive/subscribe
    value:
      type: YouTubeSubscription

Twitch points(Twitch 点数)

如果 Twitch 点数落在指定范围内 (from <= 数量 <= to),则激活。

参数
名称 类型 描述
from number Twitch bits 数量的左侧值
to number Twitch bits 数量的右侧值
示例
sensitives:
- properties:
    type: daintegrate/sensitive/twitch/points
    value:
      from: 0
      to: 1000

Twitch bits(Twitch Bits)

如果 Twitch Bits 数量落在指定范围内 (from <= 数量 <= to),则激活。

参数
名称 类型 描述
from number Twitch bits 数量的左侧值
to number Twitch bits 数量的右侧值
示例
sensitives:
- properties:
    type: daintegrate/sensitive/twitch/bits
    value:
      from: 0
      to: 2000

Handlers(处理程序)

触发器的处理程序。
当触发器激活时执行操作。

类型 描述
daintegrate/handler/message 向您的聊天添加消息
daintegrate/handler/command 代替您向服务器发送命令
Delay

每个处理器除了 properties 对象外,还有一个 delay 属性,表示命令将在多少个刻(ticks)后执行。
在 Minecraft 中,默认情况下 1 秒等于 20 个刻

替换模式

在命令和消息中,你可以指定将被替换为相应值的模式。

<donation_message>
<donation_amount>
<donation_currency>
<donation_username>
<minecraft_playername>

消息

向你的聊天添加一条消息

参数
名称 类型 描述
message 文本 将添加到聊天栏的一条消息
示例
handlers:
- delay: 10
  properties:
    type: daintegrate/handler/message
    value:
      message: Hello! It's day time!

Command

以你的身份向服务器发送一条命令

参数
名称 类型 描述
command 文本 将发送到服务器的命令(不带斜杠 /)
示例
handlers:
- delay: 10
  properties:
    type: daintegrate/handler/command
    value:
      command: time set day

你是这个资源的作者?登录后可认领此资源。

评论 0

0.0
暂无评分
5 星
0
4 星
0
3 星
0
2 星
0
1 星
0
我的评分

登录后参与评分

还没有评论,来抢沙发吧

评论配图

相似资源