Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
smoadrareun authored Mar 18, 2024
1 parent cff263e commit 818ec10
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions nonebot_plugin_bilifan/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def save_config(data):

async def auto_cup():
config = load_config()
count = {}
count = dict()
tasks = []

for user_id, group_id in config.items(): # noqa: B007
Expand All @@ -66,13 +66,15 @@ async def auto_cup():
count[group_num] += 1
else:
count[group_num] = 1
elif user_id != group_id:
count[group_id] += 1
await get_bot().send_private_msg(user_id=user_id, message=messageStr)

for group_num, num in count.items():
logger.info(f"{group_num}群组自动刷牌子任务执行完成,共{num}个")
await get_bot().send_group_msg(
group_id=group_num,
message=f"本群今日已完成{num}个自动刷牌子任务",
group_id=group_num,
message=f"本群今日已完成{num}个自动刷牌子任务",
)


Expand Down

0 comments on commit 818ec10

Please sign in to comment.