feat: give title

This commit is contained in:
ikechan8370 2023-07-03 01:19:11 +08:00
parent 8a531bf551
commit 9be8b54faf
3 changed files with 62 additions and 10 deletions

View file

@ -31,13 +31,15 @@ export class JinyanTool extends AbstractTool {
qq = qq !== 'all'
? isNaN(qq) || !qq ? e.sender.user_id : parseInt(qq.trim())
: 'all'
let group = await Bot.pickGroup(groupId)
let m = await group.getMemberMap()
if (!m.has(qq)) {
return `failed, the user ${qq} is not in group ${groupId}`
}
if (m.get(Bot.uin).role === 'member') {
return `failed, you, not user, don't have permission to edit card in group ${groupId}`
if (qq !== 'all') {
let group = await Bot.pickGroup(groupId)
let m = await group.getMemberMap()
if (!m.has(qq)) {
return `failed, the user ${qq} is not in group ${groupId}`
}
if (m.get(Bot.uin).role === 'member') {
return `failed, you, not user, don't have permission to mute other in group ${groupId}`
}
}
time = parseInt(time.trim())
if (time < 60 && time !== 0) {