Skip to content

Commit

Permalink
feat: 新增#获取禁言列表功能
Browse files Browse the repository at this point in the history
  • Loading branch information
yusheng929 committed Aug 5, 2024
1 parent e931ea5 commit f9b78e1
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions apps/GroupOther.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { karin, logger, segment } from 'node-karin'
import { karin, logger, segment, common } from 'node-karin'

/**
* 改群名
Expand All @@ -24,4 +24,19 @@ export const SeeImg = karin.command(/^#改群名/, async (e) => {
return true
}
return true
}, { name: "改群名", priority: "-1" })
}, { name: "改群名", priority: "-1" })

/**
* 获取禁言列表
*/
export const MuteList = karin.command(/^#?(|)?$/, async (e) => {
let List = await e.bot.GetProhibitedUserList(e.group_id)
console.log(List)
const message = [
segment.text("禁言列表"),
segment.text(JSON.stringify(List, null, 2)),
]
const content = common.makeForward(message, e.self_id, e.bot.account.name)
await e.bot.sendForwardMessage(e.contact, content)
return true
})

0 comments on commit f9b78e1

Please sign in to comment.