GithubHelp home page GithubHelp logo

Comments (9)

YunYouJun avatar YunYouJun commented on June 3, 2024

默认监听全部。
抱歉,这里是我的疏忽。我主要将 mirai-ts 用于了 el-bot 中。el-bot 统一自动处理了登录逻辑。
单独使用 mirai-ts 应当先自行登录,建立连接。

await mirai.login(你的 QQ );

我将稍后修改示例代码。

from mirai-ts.

YunYouJun avatar YunYouJun commented on June 3, 2024

已修正。1cb3899
当前代码可直接粘贴并修改配置使用。

from mirai-ts.

daofeng2015 avatar daofeng2015 commented on June 3, 2024

已修正。1cb3899
当前代码可直接粘贴并修改配置使用。

就不能把登录的qq放到authKey一起处理吗?

from mirai-ts.

YunYouJun avatar YunYouJun commented on June 3, 2024

mahConfig 与 mirai-api-http 的 setting.yml 数据结构保持一致。
qq 并不属于 mirai-api-http 的配置。

from mirai-ts.

YunYouJun avatar YunYouJun commented on June 3, 2024

此外,如若放在一起处理,也不适合应对操作多个 QQ 的情况。

from mirai-ts.

daofeng2015 avatar daofeng2015 commented on June 3, 2024

此外,如若放在一起处理,也不适合应对操作多个 QQ 的情况。

能否把登录的操作也放在这边用操作来实现呢?只需要启动console就行了(每次都要手动登录 好烦

from mirai-ts.

daofeng2015 avatar daofeng2015 commented on June 3, 2024

而且的话.没登录的状态好像不能注册命令的吧?不知道能不能行?

from mirai-ts.

YunYouJun avatar YunYouJun commented on June 3, 2024

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.

YunYouJun avatar YunYouJun commented on June 3, 2024

如果您没有其他问题,我将关闭该 Issue。你也可以自由 Reopen。

from mirai-ts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.