mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2024-10-21 16:27:15 +08:00
✨ 重启群名片修改
由黑名单改为白名单
This commit is contained in:
parent
7b2b73179a
commit
88fc4c042e
@ -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='模拟抽卡群员冷却')
|
||||
|
@ -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),
|
||||
|
@ -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='网页截图权限',
|
||||
|
Loading…
Reference in New Issue
Block a user