This commit is contained in:
theluyuan 2022-06-02 00:22:39 +08:00
parent 209c0acf8a
commit 3ca67f9721
5 changed files with 32 additions and 3 deletions

15
.vscode/launch.json vendored Normal file
View 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
View File

@ -0,0 +1,4 @@
import mitt from 'mitt'
const emitter = mitt()
export default emitter

View File

@ -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 = {
appID: '102011802', // 申请机器人时获取到的机器人 BotAppID
token: 'YPwwxVTwbOy9ULfvsKpmax2PC4xXr74x', // 申请机器人时获取到的机器人 BotToken

View File

@ -4,9 +4,11 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"mitt": "^3.0.0",
"qq-guild-bot": "^2.9.4"
},
"scripts": {
"start": "node ./index.js"
}
},
"type": "module"
}

View File

@ -58,6 +58,11 @@ mime-types@^2.1.12:
dependencies:
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:
version "2.9.4"
resolved "https://registry.npmmirror.com/qq-guild-bot/-/qq-guild-bot-2.9.4.tgz#5c697746fa9402a3c4537dd983571444ba497b1d"