重启群名片修改由黑名单改为白名单

This commit is contained in:
CMHopeSunshine 2023-01-19 01:19:40 +08:00
parent 7b2b73179a
commit 88fc4c042e
3 changed files with 7 additions and 7 deletions

View File

@ -9,7 +9,7 @@ class ConfigModel(BaseModel):
qrcode_bind_use_url: bool = Field(False, alias='绑定二维码以链接形式发送')
img_use_cache: bool = Field(True, alias='图片资源缓存开关')
reboot_card_ban: List[int] = Field([], alias='用重启时修改群名片群列表')
reboot_card_enable: List[int] = Field([], alias='用重启时修改群名片群列表')
sim_gacha_cd_group: int = Field(30, alias='模拟抽卡群冷却')
sim_gacha_cd_member: int = Field(60, alias='模拟抽卡群员冷却')

View File

@ -81,7 +81,7 @@ async def _(bot: Bot, event: MessageEvent):
group_list = await bot.get_group_list()
group_id_list = [g['group_id'] for g in group_list]
for group_id in group_id_list:
if group_id not in config.reboot_card_ban:
if group_id in config.reboot_card_enable:
member_info = await bot.get_group_member_info(group_id=group_id, user_id=int(bot.self_id), no_cache=True)
reboot_data['group_card'][str(group_id)] = member_info['card']
await bot.set_group_card(group_id=group_id, user_id=int(bot.self_id),

View File

@ -304,14 +304,14 @@ other_form = Form(
offText='关闭'
),
InputTag(
label='用重启时修改群名片群列表',
name='用重启时修改群名片群列表',
value='${用重启时修改群名片群列表}',
label='用重启时修改群名片群列表',
name='用重启时修改群名片群列表',
value='${用重启时修改群名片群列表}',
enableBatchAdd=True,
placeholder='添加用群名片修改的群号',
placeholder='添加用群名片修改的群号',
joinValues=False,
extractValue=True,
labelRemark=Remark(shape='circle', content='默认在重启时会把所在的群的群名片中增加"重启中"作为提示,在重启完成后修改回来,在此处添加不想修改群名片的群')
labelRemark=Remark(shape='circle', content='这些群会在重启时在bot自己的群名片中增加"重启中"作为提示,在重启完成后修改回来')
),
Switch(
label='网页截图权限',