Comments (9)
默认监听全部。
抱歉,这里是我的疏忽。我主要将 mirai-ts 用于了 el-bot 中。el-bot 统一自动处理了登录逻辑。
单独使用 mirai-ts 应当先自行登录,建立连接。
await mirai.login(你的 QQ 号);
我将稍后修改示例代码。
from mirai-ts.
已修正。1cb3899
当前代码可直接粘贴并修改配置使用。
from mirai-ts.
已修正。1cb3899
当前代码可直接粘贴并修改配置使用。
就不能把登录的qq放到authKey一起处理吗?
from mirai-ts.
mahConfig 与 mirai-api-http 的 setting.yml 数据结构保持一致。
qq 并不属于 mirai-api-http 的配置。
from mirai-ts.
此外,如若放在一起处理,也不适合应对操作多个 QQ 的情况。
from mirai-ts.
此外,如若放在一起处理,也不适合应对操作多个 QQ 的情况。
能否把登录的操作也放在这边用操作来实现呢?只需要启动console就行了(每次都要手动登录 好烦
from mirai-ts.
而且的话.没登录的状态好像不能注册命令的吧?不知道能不能行?
from mirai-ts.
mirai-ts 作为一个更为纯粹的库,主要只提供 API。更多的辅助工具我在 el-bot 中进行了实现。
其次使用 miraiOK 设置 config.txt
login QQ号 QQ密码
可以直接自动登录。
此外,el-bot 加入了 npm run start:mirai
的脚本命令以直接启动 mirai,也是我当前开发采用的方式。
你也可以参照 el-bot 中的实现方式,而无需使用它。
曾经我也实现了纯 Node.js 脚本启动 console 等,而 miraiOK 已被 mirai 官方钦定,使用简便,无需做重复工作,故已去除该脚本。
mirai-api-http 注册命令与使用命令仅需 authKey
即可,无需获取 sessionKey。
from mirai-ts.
如果您没有其他问题,我将关闭该 Issue。你也可以自由 Reopen。
from mirai-ts.
Related Issues (20)
- 当mirai重新启动之后出现的未认证提示。 HOT 5
- 机器人断线的处理流程优化 HOT 5
- mirai.api.memberInfo() 的第三个参数的类型需要是可选类型 HOT 1
- ts-node 报错 HOT 4
- MessageChain 无法正确发送 HOT 1
- src/mirai-api-http/resp.ts 中注释有误 HOT 1
- mirai-api-http 文档链接指向错误 HOT 2
- `utils/check.ts#match` 函数的实现问题 HOT 2
- 能否发送base64的图片 HOT 2
- "File" message lost in FriendMessage&GroupMessage HOT 3
- V2.0 MiraiApiHttpSetting interface HOT 2
- Member interface broken in the given api HOT 13
- 读取mirai-api-http配置时报错 HOT 3
- API 和最新的 mirai-api-http 相比有缺失 HOT 4
- 建议使用 private 修饰符修饰部分字段 HOT 2
- bot mirai.api.sendGroupMessage 能不能加个代理配置。。。 HOT 2
- export more types HOT 1
- Why “TypeError: Mirai is not a constructor”? HOT 3
- mirai-api-http 更新之后,messageFromId 方法需要传额外的参数,大佬能更新一下版本吗? HOT 6
- 请教一下如何撤回msg.reply回复的消息 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mirai-ts.