feat: add {gift_count} variable to gift/blind box default rules
- New variable {gift_count} (gift quantity) alongside existing {gift_num}
- Default templates: 感谢由{viewer_name}投喂的{gift_count}个{gift_name}
- danmaku_handler passes gift_count=message.num
- README variable table and examples updated
- Rebuild portable zip (83.9 MB)
This commit is contained in:
@@ -96,8 +96,8 @@ python main.py --room-id ROOM_ID [--voice VOICE] [--speed SPEED]
|
||||
| 事件 | 变量 |
|
||||
|------|------|
|
||||
| `danmaku` 弹幕 | `{uname}` `{msg}` |
|
||||
| `gift` 普通礼物 | `{viewer_name}` `{gift_name}` `{gift_num}` `{gift_price}` `{gift_coin_type}` |
|
||||
| `blind_box` 盲盒礼物 | `{viewer_name}` `{gift_name}` `{gift_num}` `{blind_box_gift}` |
|
||||
| `gift` 普通礼物 | `{viewer_name}` `{gift_name}` `{gift_count}` `{gift_price}` `{gift_coin_type}` |
|
||||
| `blind_box` 盲盒礼物 | `{viewer_name}` `{gift_name}` `{gift_count}` `{blind_box_gift}` |
|
||||
| `enter_room` 进房 | `{viewer_name}` `{user_uid}` |
|
||||
| `follow` 关注 | `{viewer_name}` `{user_uid}` |
|
||||
| `interact_other` 其他互动 | `{viewer_name}` `{user_uid}` `{interact_type}`(分享/特别关注/互粉) |
|
||||
@@ -110,8 +110,8 @@ python main.py --room-id ROOM_ID [--voice VOICE] [--speed SPEED]
|
||||
```json
|
||||
{
|
||||
"templates": {
|
||||
"gift": "感谢由{viewer_name}投喂的{gift_name}",
|
||||
"blind_box": "感谢由{viewer_name}投喂的{gift_name}爆出了{blind_box_gift}",
|
||||
"gift": "感谢由{viewer_name}投喂的{gift_count}个{gift_name}",
|
||||
"blind_box": "感谢由{viewer_name}投喂的{gift_count}个{gift_name}爆出了{blind_box_gift}",
|
||||
"enter_room": "欢迎{viewer_name}进入直播间",
|
||||
"buy_guard": "恭喜{ships_viewer_name}成为尊贵的{ships_level}",
|
||||
"super_chat": "{viewer_name}的醒目留言:{super_chat_content}"
|
||||
|
||||
Reference in New Issue
Block a user