mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
fix: 加回来禁言和踢出
This commit is contained in:
parent
351597a33d
commit
ef72d886a5
3 changed files with 63 additions and 6 deletions
11
apps/chat.js
11
apps/chat.js
|
|
@ -1925,6 +1925,7 @@ export class chatgpt extends plugin {
|
|||
if (conversation) {
|
||||
option = Object.assign(option, conversation)
|
||||
}
|
||||
let isAdmin = e.sender.role === 'admin' || e.sender.role === 'owner'
|
||||
let tools = [
|
||||
new SearchVideoTool(),
|
||||
new SendVideoTool(),
|
||||
|
|
@ -1934,11 +1935,13 @@ export class chatgpt extends plugin {
|
|||
// new SendDiceTool(),
|
||||
new EditCardTool(),
|
||||
new QueryStarRailTool(),
|
||||
new WebsiteTool()
|
||||
new WebsiteTool(),
|
||||
new JinyanTool(isAdmin, e.sender.user_id),
|
||||
new KickOutTool(isAdmin, e.sender.user_id)
|
||||
]
|
||||
if (e.sender.role === 'admin' || e.sender.role === 'owner') {
|
||||
tools.push(...[new JinyanTool(), new KickOutTool()])
|
||||
}
|
||||
// if (e.sender.role === 'admin' || e.sender.role === 'owner') {
|
||||
// tools.push(...[new JinyanTool(), new KickOutTool()])
|
||||
// }
|
||||
let funcMap = {}
|
||||
tools.forEach(tool => {
|
||||
funcMap[tool.name] = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue