mirror of
https://github.com/Jerryplusy/crystelf-plugin.git
synced 2025-12-05 15:41:56 +00:00
feat:兼容更多onebot
This commit is contained in:
parent
4492d58d9d
commit
a051f892ae
@ -153,7 +153,7 @@ Bot.on?.('notice.group.decrease', async (e) => {
|
|||||||
|
|
||||||
//加群事件
|
//加群事件
|
||||||
Bot.on?.('notice.group.increase', async (e) => {
|
Bot.on?.('notice.group.increase', async (e) => {
|
||||||
if (e.isMaster) return true;
|
if (e.isMaster || e.user_id === e.bot.uin) return true;
|
||||||
const key = `${e.group_id}_${e.user_id}`;
|
const key = `${e.group_id}_${e.user_id}`;
|
||||||
if (pending.get(key)) return true;
|
if (pending.get(key)) return true;
|
||||||
logger.info(`[crystelf-plugin] 群[${e.group_id}]开始对用户[${e.user_id}]的加群验证`);
|
logger.info(`[crystelf-plugin] 群[${e.group_id}]开始对用户[${e.user_id}]的加群验证`);
|
||||||
|
|||||||
0
apps/face-reply-message.js
Normal file
0
apps/face-reply-message.js
Normal file
@ -4,6 +4,7 @@ import axios from 'axios';
|
|||||||
import configControl from '../lib/config/configControl.js';
|
import configControl from '../lib/config/configControl.js';
|
||||||
import ConfigControl from '../lib/config/configControl.js';
|
import ConfigControl from '../lib/config/configControl.js';
|
||||||
import Group from '../lib/yunzai/group.js';
|
import Group from '../lib/yunzai/group.js';
|
||||||
|
import group from '../lib/yunzai/group.js';
|
||||||
|
|
||||||
export default class ChuochuoPlugin extends plugin {
|
export default class ChuochuoPlugin extends plugin {
|
||||||
constructor() {
|
constructor() {
|
||||||
@ -46,7 +47,7 @@ async function pokeMaster(e) {
|
|||||||
}
|
}
|
||||||
await e.reply(`小嘿子不许戳!`, false, { recallMsg: 60 });
|
await e.reply(`小嘿子不许戳!`, false, { recallMsg: 60 });
|
||||||
await tool.sleep(1000);
|
await tool.sleep(1000);
|
||||||
await e.bot.sendApi('group_poke', { group_id: e.group_id, user_id: e.operator_id });
|
await Group.groupPoke(e, e.operator_id, e.group_id);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -39,7 +39,7 @@ export default class YunzaiUtils {
|
|||||||
* @returns {Promise<*>}
|
* @returns {Promise<*>}
|
||||||
*/
|
*/
|
||||||
static async getAdapter(e) {
|
static async getAdapter(e) {
|
||||||
const adapter = e.bot.sendApi('get_version_info', {})?.data?.app_name;
|
const adapter = e.bot.version?.app_name;
|
||||||
if (adapter === 'NapCat.Onebot') {
|
if (adapter === 'NapCat.Onebot') {
|
||||||
return 'nc';
|
return 'nc';
|
||||||
} else if (adapter === 'Lagrange.Onebot') {
|
} else if (adapter === 'Lagrange.Onebot') {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user