🚑 修复入群欢迎bug

This commit is contained in:
CMHopeSunshine 2022-07-04 14:13:25 +08:00
parent 60373e7a47
commit 004112d43b
3 changed files with 1990 additions and 995 deletions

View File

@ -52,6 +52,7 @@ async def FriendNew(bot: Bot, event: FriendAddNoticeEvent):
@notice_handle.handle()
async def GroupNewMember(bot: Bot, event: GroupIncreaseNoticeEvent):
greet_emoticon = MessageBuild.Image(Path() / 'resources' / 'LittlePaimon' / 'emoticons' / '派蒙-干杯.png', mode='RGBA')
if event.user_id == event.self_id:
await sleep(random.randint(4, 8))
await bot.send_group_msg(group_id=event.group_id, message=Message(

View File

@ -36,7 +36,7 @@ async def check_resource():
for resource in resource_list:
res_path = new_resource_path / resource['path'].replace('LittlePaimon/', '')
download_url = 'http://genshin.cherishmoon.fun/res/' + resource['path'].replace('LittlePaimon/', '')
if res_path.exists() and hashlib.md5(res_path.read_bytes()).hexdigest() == resource['hash']:
if res_path.exists() and (hashlib.md5(res_path.read_bytes()).hexdigest() == resource['hash'] or not resource['lock']):
continue
try:
await download(download_url, res_path)

File diff suppressed because it is too large Load Diff