调整聊天排行榜功能
This commit is contained in:
3
robot.py
3
robot.py
@@ -685,9 +685,8 @@ class Robot:
|
|||||||
if not receivers:
|
if not receivers:
|
||||||
return
|
return
|
||||||
|
|
||||||
feature = getattr(Feature, "DAILY_SUMMARY", None)
|
|
||||||
for r in receivers:
|
for r in receivers:
|
||||||
if self.gbm.get_group_permission(r, feature) == PermissionStatus.ENABLED:
|
if self.gbm.get_group_permission(r, Feature.DAILY_SUMMARY) == PermissionStatus.ENABLED:
|
||||||
output = await self.message_storage.generate_and_send_ranking(r, self.allContacts)
|
output = await self.message_storage.generate_and_send_ranking(r, self.allContacts)
|
||||||
await self.ipad_bot.send_text_message(r, output)
|
await self.ipad_bot.send_text_message(r, output)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
@@ -30,8 +30,7 @@ class Feature(Enum):
|
|||||||
DAILY_NEWS = 2, "📰 每日新闻自动播报 [每日8:30定时发送]"
|
DAILY_NEWS = 2, "📰 每日新闻自动播报 [每日8:30定时发送]"
|
||||||
PDF_CAPABILITY = 3, "📄 sehuatang PDF能力 [无]"
|
PDF_CAPABILITY = 3, "📄 sehuatang PDF能力 [无]"
|
||||||
EPIC = 4, "📊 EPIC自动播报 [每周五自动发送]" # 新增的功能
|
EPIC = 4, "📊 EPIC自动播报 [每周五自动发送]" # 新增的功能
|
||||||
|
DAILY_SUMMARY = 5, "🕤 每日群发言总结 [每日9:30定时发送]"
|
||||||
# DAILY_SUMMARY = 3, "🕤 每日群发言总结 [每日9:30定时发送]"
|
|
||||||
# AI_CAPABILITY = 4, "🤖 AI对话 [ai, 聊天, AI] 用法:ai 如何写一个机器人?"
|
# AI_CAPABILITY = 4, "🤖 AI对话 [ai, 聊天, AI] 用法:ai 如何写一个机器人?"
|
||||||
# SUMMARY_CAPABILITY = 5, "📝 群总结能力 [#总结]"
|
# SUMMARY_CAPABILITY = 5, "📝 群总结能力 [#总结]"
|
||||||
# PIC = 8, "🖼️ 图来能力 [图来, 秀人]"
|
# PIC = 8, "🖼️ 图来能力 [图来, 秀人]"
|
||||||
|
|||||||
Reference in New Issue
Block a user