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:
@@ -84,12 +84,14 @@ class DanmakuHandler(blivedm.BaseHandler):
|
||||
viewer_name=message.uname,
|
||||
gift_name=message.gift_name,
|
||||
gift_num=message.num,
|
||||
gift_count=message.num,
|
||||
blind_box_gift=blind_box_gift)
|
||||
else:
|
||||
text = event_text(self._rules, "gift",
|
||||
viewer_name=message.uname,
|
||||
gift_name=message.gift_name,
|
||||
gift_num=message.num,
|
||||
gift_count=message.num,
|
||||
gift_price=message.price,
|
||||
gift_coin_type=message.coin_type)
|
||||
logger.info("Gift: %s x%d from %s (blind=%s)",
|
||||
|
||||
Reference in New Issue
Block a user