提供全局被动控制

This commit is contained in:
HibiKier
2022-12-26 18:40:34 +08:00
parent 802f4df2ce
commit c49ef3052f
11 changed files with 213 additions and 77 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ async def _():
gl = [g["group_id"] for g in gl]
msg_list, code = await get_epic_free(bot, "Group")
for g in gl:
if group_manager.check_group_task_status(g, "epic_free_game"):
if group_manager.check_task_status("epic_free_game", g):
try:
if msg_list and code == 200:
await bot.send_group_forward_msg(group_id=g, messages=msg_list)
+5 -3
View File
@@ -54,7 +54,7 @@ usage:
私聊添加词条
(私聊情况下)删除词条: 删除私聊词条
(私聊情况下)删除全局词条
(私聊情况下)修改词条: 修改词条私聊词条
(私聊情况下)修改词条: 修改私聊词条
(私聊情况下)修改全局词条
用法与普通用法相同
""".strip()
@@ -96,6 +96,8 @@ async def _(
if isinstance(event, PrivateMessageEvent) and str(event.user_id) not in bot.config.superusers:
await add_word.finish('权限不足捏')
word_scope, word_type, problem, answer = reg_group
if not word_scope and isinstance(event, PrivateMessageEvent):
word_scope = '私聊'
if (
word_scope
and word_scope in ["全局", "私聊"]
@@ -153,8 +155,8 @@ async def _(
re.compile(problem)
except re.error:
await add_word.finish(f"添加词条失败,正则表达式 {problem} 非法!")
if str(event.user_id) in bot.config.superusers and isinstance(event, PrivateMessageEvent):
word_scope = "私聊"
# if str(event.user_id) in bot.config.superusers and isinstance(event, PrivateMessageEvent):
# word_scope = "私聊"
nickname = None
if problem and bot.config.nickname:
nickname = [nk for nk in bot.config.nickname if problem.startswith(nk)]