feature: 增加用户名
This commit is contained in:
parent
81beeb0bfa
commit
3aac394e4b
|
@ -608,6 +608,7 @@ class PluginsLoader {
|
|||
|
||||
if (e?.user_id) {
|
||||
e.user_avatar = `https://q1.qlogo.cn/g?b=qq&s=0&nk=${e.user_id}`
|
||||
e.user_name = e.sender.nickname
|
||||
}
|
||||
if (e?.group_id) {
|
||||
e.group_avatar = `https://p.qlogo.cn/gh/${e.group_id}/${e.group_id}/640/`
|
||||
|
|
|
@ -2,11 +2,11 @@ import { type GroupMessage } from 'icqq'
|
|||
// import { Client } from 'icqq'
|
||||
// import { PrivateMessage } from 'oicq'
|
||||
|
||||
interface EventTypeBase {
|
||||
export interface EventType extends GroupMessage {
|
||||
/**
|
||||
* 是否是主人
|
||||
*/
|
||||
isMaster: boolean;
|
||||
isMaster: boolean
|
||||
/**
|
||||
* 是否是管理员
|
||||
*/
|
||||
|
@ -14,19 +14,62 @@ interface EventTypeBase {
|
|||
/**
|
||||
* 是否是群里
|
||||
*/
|
||||
isGroup: boolean;
|
||||
isGroup: boolean
|
||||
/**
|
||||
* 是私聊
|
||||
*/
|
||||
isPrivate?: any
|
||||
/**
|
||||
* 是频道
|
||||
*/
|
||||
isGuild?: any
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
user_name: string
|
||||
/**
|
||||
* 用户头像
|
||||
*/
|
||||
user_avatar: string | null
|
||||
/**
|
||||
* 用户消息
|
||||
*/
|
||||
msg: string;
|
||||
msg: string
|
||||
/**
|
||||
* 消息发送
|
||||
* @param arg
|
||||
* @returns
|
||||
*/
|
||||
reply: (...arg: any[]) => Promise<any>;
|
||||
reply: (...arg: any[]) => Promise<any>
|
||||
/**
|
||||
* 群号
|
||||
*/
|
||||
group_id: number;
|
||||
/**
|
||||
* 群名
|
||||
*/
|
||||
group_name: string;
|
||||
/**
|
||||
* 群头像
|
||||
*/
|
||||
group_avatar: string | null
|
||||
/**
|
||||
*
|
||||
*/
|
||||
group: {
|
||||
is_owner: any;
|
||||
recallMsg: (...arg: any[]) => any;
|
||||
getMemberMap: any;
|
||||
quit: any;
|
||||
mute_left: any
|
||||
|
||||
pickMember: any
|
||||
|
||||
|
||||
sendMsg: any
|
||||
};
|
||||
/**
|
||||
*/
|
||||
file: any;
|
||||
/**
|
||||
*/
|
||||
|
@ -59,88 +102,32 @@ interface EventTypeBase {
|
|||
*
|
||||
*/
|
||||
game?: any
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
detail_type?: any
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
at?: any
|
||||
|
||||
/**
|
||||
* 群号
|
||||
*/
|
||||
group_id: number;
|
||||
/**
|
||||
* 群名
|
||||
*/
|
||||
group_name: string;
|
||||
|
||||
/**
|
||||
* 用户头像
|
||||
*/
|
||||
user_avatar: string | null
|
||||
|
||||
/**
|
||||
* 群头像
|
||||
*/
|
||||
group_avatar: string | null
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
group: {
|
||||
is_owner: any;
|
||||
recallMsg: (...arg: any[]) => any;
|
||||
getMemberMap: any;
|
||||
quit: any;
|
||||
mute_left: any
|
||||
|
||||
pickMember: any
|
||||
|
||||
|
||||
sendMsg: any
|
||||
};
|
||||
/**
|
||||
*
|
||||
*/
|
||||
atBot: any;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
isPrivate?: any
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
hasAlias?: any
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
replyNew?: any
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
isGuild?: any
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
friend?: any
|
||||
}
|
||||
|
||||
export interface EventType extends EventTypeBase, GroupMessage { }
|
||||
|
||||
/**
|
||||
* 函数式回调类型
|
||||
*/
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import BaseModel from './BaseModel.js'
|
||||
import lodash from 'lodash'
|
||||
import { UserGameDB } from './index.js'
|
||||
import MysUtil from '../mys/MysUtil.js'
|
||||
import MysUserDB from './MysUserDB.js'
|
||||
|
||||
const { Types } = BaseModel
|
||||
|
||||
|
|
Loading…
Reference in New Issue