feat: 伪人禁用群

This commit is contained in:
misaka20002 2025-02-07 22:08:21 +08:00
parent 916e1082d7
commit 9012c46f81
3 changed files with 20 additions and 2 deletions

View file

@ -28,6 +28,12 @@ export class bym extends plugin {
if (!Config.enableBYM) {
return false
}
// 伪人禁用群
if (Config.bymDisableGroup?.includes(e.group_id?.toString())) {
return false
}
let sender = e.sender.user_id
let card = e.sender.card || e.sender.nickname
let group = e.group_id

View file

@ -54,7 +54,7 @@ export function supportGuoba () {
{
field: 'enableBYM',
label: '开启伪人模式',
bottomHelpMessage: '开启后将在群内随机发言伪装成人。取消机器人前缀体验最佳。目前仅支持gemini会使用gemini的配置。发言包括AI名字会必定触发回复。暂不支持分群管理可在不同群禁用或启动“ChatGPT-Plugin 伪人bym”功能',
bottomHelpMessage: '开启后将在群内随机发言伪装成人。取消机器人前缀体验最佳。目前仅支持gemini会使用gemini的配置。发言包括AI名字会必定触发回复。',
component: 'Switch'
},
{
@ -918,7 +918,6 @@ export function supportGuoba () {
label: '合成emoji的API地址默认谷歌厨房',
component: 'Input'
},
{
field: 'bymRate',
label: '伪人模式触发概率,单位为%',
@ -928,6 +927,18 @@ export function supportGuoba () {
max: 100
}
},
{
field: 'bymDisableGroup',
label: '伪人禁用群',
bottomHelpMessage: '设置在该群禁用伪人模式',
component: "GTags",
componentProps: {
placeholder: '请输入群号',
allowAdd: true,
allowDel: true,
valueParser: ((value) => value.split(',') || []),
},
},
{
field: 'bymMode',
label: '伪人模型',

View file

@ -199,6 +199,7 @@ const defaultConfig = {
enableBYM: false,
// 触发对话的概率百分比。比如5%就写5
bymRate: 5,
bymDisableGroup: [],
// 伪人模式触发骂人反击的关键词
bymFuckList: [
'骂',