@交互提醒
This commit is contained in:
@@ -25,10 +25,10 @@ class PermissionStatus(Enum):
|
||||
# 在Feature枚举类中添加新的功能权限
|
||||
class Feature(Enum):
|
||||
"""功能权限枚举,带序号"""
|
||||
ROBOT = 1, "群机器人"
|
||||
ROBOT = 1, "群机器人-总开关"
|
||||
DAILY_NEWS = 2, "每日新闻自动播报"
|
||||
DAILY_SUMMARY = 3, "每日群发言总结"
|
||||
AI_CAPABILITY = 4, "AI对话 [ai, 聊天, AI] "
|
||||
AI_CAPABILITY = 4, "AI对话 [ai, 聊天, AI] 用法:ai 今天是什么天气?"
|
||||
SUMMARY_CAPABILITY = 5, "群总结能力 [#总结]"
|
||||
PDF_CAPABILITY = 6, "sehuatang PDF能力"
|
||||
EPIC = 7, "EPIC自动播报" # 新增的功能
|
||||
@@ -330,54 +330,7 @@ def simulate_commands():
|
||||
print(GroupBotManager.get_group_permission(group_id, Feature.AI_CAPABILITY) == PermissionStatus.DISABLED)
|
||||
|
||||
print(GroupBotManager.get_group_permission(group_id, Feature.SUMMARY_CAPABILITY) == PermissionStatus.ENABLED)
|
||||
# # 启用群机器人
|
||||
# print(GroupBoManager.handle_command(group_id, "ROBOT-启用"))
|
||||
#
|
||||
# # 启用每日新闻自动播报
|
||||
# print(GroupBotManager.handle_command(group_id, "2-启用")) # 使用序号启用每日新闻自动播报
|
||||
#
|
||||
# # 关闭群AI能力
|
||||
# print(GroupBotManager.handle_command(group_id, "4-关闭")) # 使用序号关闭群AI能力
|
||||
#
|
||||
# # 启用群总结能力
|
||||
# print(GroupBotManager.handle_command(group_id, "5-启用")) # 使用序号启用群总结能力
|
||||
#
|
||||
# # 关闭Sehuatang PDF能力
|
||||
# print(GroupBotManager.handle_command(group_id, "6-关闭")) # 使用序号关闭Sehuatang PDF能力
|
||||
#
|
||||
# # 启用EPIC自动播报
|
||||
# print(GroupBotManager.handle_command(group_id, "7-启用")) # 使用序号启用EPIC自动播报
|
||||
#
|
||||
# # 查看当前群组的功能权限
|
||||
# print(GroupBotManager.get_group_permission(group_id, Feature.ROBOT))
|
||||
# print(GroupBotManager.get_group_permission(group_id, Feature.DAILY_NEWS))
|
||||
# print(GroupBotManager.get_group_permission(group_id, Feature.AI_CAPABILITY))
|
||||
# print(GroupBotManager.get_group_permission(group_id, Feature.SUMMARY_CAPABILITY))
|
||||
# print(GroupBotManager.get_group_permission(group_id, Feature.PDF_CAPABILITY))
|
||||
# print(GroupBotManager.get_group_permission(group_id, Feature.EPIC))
|
||||
#
|
||||
# # 查看群组所有功能和状态
|
||||
# permissions = GroupBotManager.list_group_permissions(group_id)
|
||||
# for feature, status in permissions.items():
|
||||
# print(f"{feature.description} (序号: {feature.value}): {status.value}")
|
||||
#
|
||||
# # 查看 group:list 中的群组
|
||||
# print("当前启用群机器人的群组:", GroupBotManager.get_group_list())
|
||||
#
|
||||
# # 查看菜单功能列表
|
||||
# print("功能列表:")
|
||||
# print(GroupBotManager.handle_command(group_id, "MENU"))
|
||||
#
|
||||
# # 查看 group:list 清单
|
||||
# print("群组清单:")
|
||||
# print(GroupBotManager.handle_command(group_id, "GROUP_LIST"))
|
||||
#
|
||||
# # 更新缓存
|
||||
# print(GroupBotManager.handle_command(group_id, "UPDATE"))
|
||||
#
|
||||
# # 保存到 Redis
|
||||
# GroupBotManager.save_to_redis()
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# 执行模拟命令
|
||||
|
||||
Reference in New Issue
Block a user