Commit 5d4729c

benny-dou <60535774+benny-dou@users.noreply.github.com>
2025-06-03 10:28:03
chore(danmu): show super chats
1 parent 7e139f5
Changed files (1)
src
src/danmu/entrypoint.py
@@ -97,14 +97,13 @@ async def query_danmu(client: Client, message: Message, **kwargs):
     header = f"📖**{qtype}记录 ({user})**:" if user else f"📖**{qtype}记录**:"
     profit = ""
     profit_usd = 0
-    if info["ctype"] not in ["GROUP", "SUPERGROUP"]:  # 在群组中不展示打赏榜
-        for currency, amount in sorted(super_chats.items()):
-            profit += f"\n{CURRENCY[currency]}**{currency}**: {number(amount)}" if currency in CURRENCY else ""
-            profit_usd += amount * (await to_usd(currency)) if currency in CURRENCY else Decimal()
-        # if only "USD" ccy, do not include total USD
-        super_chats.pop("USD", None)  # remove "USD"
-        if profit_usd > 0 and super_chats:
-            profit += f"\n💵**总计**: {profit_usd:.2f} USD"
+    for currency, amount in sorted(super_chats.items()):
+        profit += f"\n{CURRENCY[currency]}**{currency}**: {number(amount)}" if currency in CURRENCY else ""
+        profit_usd += amount * (await to_usd(currency)) if currency in CURRENCY else Decimal()
+    # if only "USD" ccy, do not include total USD
+    super_chats.pop("USD", None)  # remove "USD"
+    if profit_usd > 0 and super_chats:
+        profit += f"\n💵**总计**: {profit_usd:.2f} USD"
 
     tips = f"{DANMU_TIPS}\n" if qtype == "弹幕" else f"{FAYAN_TIPS}\n"
     if file_bytes(paths) < 20480:  #  20 KB, short length, try send as message directly