1 Star 3 Fork 0

Hello World/YunzaiJS-example

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
结婚小插件.js 1.96 KB
一键复制 编辑 原始数据 按行查看 历史
Hello World 提交于 2023-01-04 00:43 . 更改了哼哼啊啊啊啊啊
import plugin from '../../lib/plugins/plugin.js'
import fetch from "node-fetch"
import { segment } from "oicq";
let jiehun=0
let xinren =[]
let targetQQ = ''
export class example extends plugin {
constructor () {
super({
/** 功能名称 */
name: 'DJ表情插件',
/** 功能描述 */
dsc: '表情制作',
event: 'message',
/** 优先级,数字越小等级越高 */
priority: 5000,
rule: [
{
/** 命令正则匹配 */
reg: '^#结婚$',
/** 执行方法 */
fnc: 'ol'
},
{
/** 命令正则匹配 */
reg: '#(.*)$',
/** 执行方法 */
fnc: 'xinren'
},
{
/** 命令正则匹配 */
reg: '^不结了$',
/** 执行方法 */
fnc: 'bujiele'
},
]
})
}
async ol (e){
await this.reply('请用“#@”艾特出新郎')
}
async xinren (e){ if (e.message[1].type == 'at'&jiehun == 0 & String(xinren.length)<1){
targetQQ = e.at;
xinren[xinren.length] = e.at;
jiehun = 1
await this.reply('请用“#@”艾特出新娘')
}else if(e.message[1].type == 'at'& jiehun == 1 & String(xinren.length)==1){
let targetQQ2 = e.at;
xinren[xinren.length] = e.at;
let url ='https://api.caonm.net/api/jhzz/j.php?qq='+ targetQQ +'&qq2='+targetQQ2;console.log(url)
await this.reply('佳偶双双已天成,金玉良缘喜结盟。夫妻对拜情意浓,不负青春与苍穹。红梅傲雪添喜庆,更添忠贞一生情。雕梁画栋玉屏风,良辰美景到天明。祝:钟爱一生。')
await this.reply(segment.image(url),true)
xinren = []
jiehun = 0
}
}
async bujiele (e){ if(e.msg == '不结了')
await this.reply('可惜不是你~陪我到最后~🎶')
xinren = []
jiehun = 0
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/wan13877501248/yunzai-js-example.git
[email protected]:wan13877501248/yunzai-js-example.git
wan13877501248
yunzai-js-example
YunzaiJS-example
master

搜索帮助