天气查询插件
This commit is contained in:
@@ -16,6 +16,7 @@ from loguru import logger
|
||||
# 连接到本地 Redis 服务
|
||||
r = redis.StrictRedis(host='192.168.2.40', port=6379, db=0, decode_responses=True)
|
||||
|
||||
|
||||
class PermissionStatus(Enum):
|
||||
"""权限状态枚举"""
|
||||
ENABLED = "enabled"
|
||||
@@ -45,6 +46,7 @@ class Feature(Enum):
|
||||
GROUP_MEMBER_CHANGE = 18, "群成员变更提醒功能"
|
||||
# KID_PHOTO_EXTRACT = 19, "儿童照片提取转发功能" # 小朋友照片提取功能
|
||||
NEWS = 20, "全球政治经济新闻"
|
||||
WEATHER = 21, "天气查询"
|
||||
|
||||
def __new__(cls, value, description):
|
||||
obj = object.__new__(cls)
|
||||
@@ -334,7 +336,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)
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# 执行模拟命令
|
||||
|
||||
Reference in New Issue
Block a user