天气支持私聊
This commit is contained in:
@@ -189,14 +189,14 @@ def plugin_points_cost(points: int, description: str = None, feature: Feature =
|
||||
# 检查权限
|
||||
roomid = message.get("roomid", "")
|
||||
if feature and roomid:
|
||||
gbm = message.get("gbm")
|
||||
if gbm and gbm.get_group_permission(roomid, feature) == PermissionStatus.DISABLED:
|
||||
if GroupBotManager.get_group_permission(roomid, feature) == PermissionStatus.DISABLED:
|
||||
return False, "没有权限"
|
||||
|
||||
# 检查是否开启了积分获取功能
|
||||
if gbm and gbm.get_group_permission(roomid,
|
||||
Feature.SIGNIN) == PermissionStatus.DISABLED and gbm.get_group_permission(
|
||||
roomid, Feature.TASK_GAME) == PermissionStatus.DISABLED:
|
||||
if (GroupBotManager.get_group_permission(roomid,
|
||||
Feature.SIGNIN) == PermissionStatus.DISABLED
|
||||
and GroupBotManager.get_group_permission(
|
||||
roomid, Feature.TASK_GAME) == PermissionStatus.DISABLED):
|
||||
return await func(self, message)
|
||||
|
||||
# 获取消息信息
|
||||
@@ -265,14 +265,14 @@ def plugin_points_cost(points: int, description: str = None, feature: Feature =
|
||||
# 检查权限
|
||||
roomid = message.get("roomid", "")
|
||||
if feature and roomid:
|
||||
gbm = message.get("gbm")
|
||||
if gbm and gbm.get_group_permission(roomid, feature) == PermissionStatus.DISABLED:
|
||||
if GroupBotManager.get_group_permission(roomid, feature) == PermissionStatus.DISABLED:
|
||||
return False, "没有权限"
|
||||
|
||||
# 检查是否开启了积分获取功能
|
||||
if gbm and gbm.get_group_permission(roomid,
|
||||
Feature.SIGNIN) == PermissionStatus.DISABLED and gbm.get_group_permission(
|
||||
roomid, Feature.TASK_GAME) == PermissionStatus.DISABLED:
|
||||
if (GroupBotManager.get_group_permission(roomid,
|
||||
Feature.SIGNIN) == PermissionStatus.DISABLED
|
||||
and GroupBotManager.get_group_permission(
|
||||
roomid, Feature.TASK_GAME) == PermissionStatus.DISABLED):
|
||||
return func(self, message)
|
||||
|
||||
# 获取消息信息
|
||||
|
||||
Reference in New Issue
Block a user