add mitt
This commit is contained in:
parent
209c0acf8a
commit
3ca67f9721
15
.vscode/launch.json
vendored
Normal file
15
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
// 使用 IntelliSense 了解相关属性。
|
||||||
|
// 悬停以查看现有属性的描述。
|
||||||
|
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"type": "pwa-chrome",
|
||||||
|
"request": "launch",
|
||||||
|
"name": "Launch Chrome against localhost",
|
||||||
|
"url": "http://localhost:8080",
|
||||||
|
"webRoot": "${workspaceFolder}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
4
bin/message/index.js
Normal file
4
bin/message/index.js
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
import mitt from 'mitt'
|
||||||
|
const emitter = mitt()
|
||||||
|
|
||||||
|
export default emitter
|
5
index.js
5
index.js
@ -1,5 +1,8 @@
|
|||||||
const { createOpenAPI, createWebsocket } = require('qq-guild-bot');
|
import { createOpenAPI, createWebsocket } from 'qq-guild-bot';
|
||||||
|
|
||||||
|
import message from './bin/message/index.js'
|
||||||
|
|
||||||
|
message.$emit("aaa")
|
||||||
const testConfig = {
|
const testConfig = {
|
||||||
appID: '102011802', // 申请机器人时获取到的机器人 BotAppID
|
appID: '102011802', // 申请机器人时获取到的机器人 BotAppID
|
||||||
token: 'YPwwxVTwbOy9ULfvsKpmax2PC4xXr74x', // 申请机器人时获取到的机器人 BotToken
|
token: 'YPwwxVTwbOy9ULfvsKpmax2PC4xXr74x', // 申请机器人时获取到的机器人 BotToken
|
||||||
|
@ -4,9 +4,11 @@
|
|||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"mitt": "^3.0.0",
|
||||||
"qq-guild-bot": "^2.9.4"
|
"qq-guild-bot": "^2.9.4"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start":"node ./index.js"
|
"start": "node ./index.js"
|
||||||
}
|
},
|
||||||
|
"type": "module"
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,11 @@ mime-types@^2.1.12:
|
|||||||
dependencies:
|
dependencies:
|
||||||
mime-db "1.52.0"
|
mime-db "1.52.0"
|
||||||
|
|
||||||
|
mitt@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.npmmirror.com/mitt/-/mitt-3.0.0.tgz#69ef9bd5c80ff6f57473e8d89326d01c414be0bd"
|
||||||
|
integrity sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==
|
||||||
|
|
||||||
qq-guild-bot@^2.9.4:
|
qq-guild-bot@^2.9.4:
|
||||||
version "2.9.4"
|
version "2.9.4"
|
||||||
resolved "https://registry.npmmirror.com/qq-guild-bot/-/qq-guild-bot-2.9.4.tgz#5c697746fa9402a3c4537dd983571444ba497b1d"
|
resolved "https://registry.npmmirror.com/qq-guild-bot/-/qq-guild-bot-2.9.4.tgz#5c697746fa9402a3c4537dd983571444ba497b1d"
|
||||||
|
Loading…
Reference in New Issue
Block a user