加入群ID显示
This commit is contained in:
@@ -206,53 +206,56 @@ def simulate_commands():
|
||||
|
||||
group_id = "49571962306@chatroom"
|
||||
|
||||
# 启用群机器人
|
||||
print(GroupBotManager.handle_command(group_id, "ROBOT-启用"))
|
||||
print(GroupBotManager.get_group_permission(group_id, Feature.AI_CAPABILITY) == PermissionStatus.DISABLED)
|
||||
|
||||
# 启用每日新闻自动播报
|
||||
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()
|
||||
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