Skip to content

WechatyOptions.name设置的json文件在哪里? #77

Open

Description

@panwudi

怎么都找不到?
目前不需要设置也可以不用每次扫码登录,是不是这个属性已经弃用了?

Activity

  1. wj-Mcat commented on May 1, 2022

    @wj-Mcat
    Collaborator

    There is no json file configured in WechatyOption.name field which is to figure out the name of th bot.

    So, how do you know there is json file base on WechatyOption?

    BTW, if you have the bot logined onece, the bot will keep online until you call bot.logout method.

    Please feel free to tell me more.

  2. panwudi commented on May 2, 2022

    @panwudi
    Author

    截屏2022-05-02 上午10 10 49

    accordding to the api doc: Wechaty Name. When you set this: new Wechaty({profile: 'wechatyName'}) it will generate a file called wechatyName.memory-card.json. This file stores the bot's login information. If the file is valid, the bot can auto login so you don't need to scan the qrcode to login again. Also, you can set the environment variable for WECHATY_PROFILE to set this value when you start. eg: WECHATY_PROFILE="your-cute-bot-name" node bot.js. This field is deprecated, please use name instead. https://github.com/wechaty/wechaty/issues/2049
  3. wj-Mcat commented on May 2, 2022

    @wj-Mcat
    Collaborator

    The above is the docs of ts-wechaty, not python-wechaty. So there are many differences between them.

    I suggest that you can take a look at python-wechaty document or the source code of python-wechaty.

  4. panwudi commented on May 2, 2022

    @panwudi
    Author

    document

    Wechaty 类中并没有logout这个方法啊? 源码里面也只有 on_logout

  5. panwudi commented on May 2, 2022

    @panwudi
    Author

    python-wechaty的文档里也错误的写了机器人登录保存文件
    截屏2022-05-02 下午5 20 00

  6. wj-Mcat commented on May 2, 2022

    @wj-Mcat
    Collaborator

    Yes, the doc of python-wechaty is in a early stage, which will be improved in this summer. So I suggest that you can checkout the source code and example code to get the details about your problem.

  7. panwudi commented on May 2, 2022

    @panwudi
    Author

    Yes, the doc of python-wechaty is in a early stage, which will be improved in this summer. So I suggest that you can checkout the source code and example code to get the details about your problem.

    嗯,谢谢。 另外heartbeat 捕获事件也不生效,不管是在Wechaty基类还是在实例里面的 on_heartbeat 方法中随便插一句输出语句都不生效。 我要如何监控到机器人在正常运行呢?

    python学了三周,就为这个机器人现学的,可能问题比较低级。谢谢

  8. shavingha commented on Nov 30, 2023

    @shavingha

    where do you store login state ??
    I have change computer, AND I can autologin too.......

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions