Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to link it with personal account. #693

Closed
AliAyub007 opened this issue Jul 26, 2017 · 8 comments
Closed

How to link it with personal account. #693

AliAyub007 opened this issue Jul 26, 2017 · 8 comments

Comments

@AliAyub007
Copy link

AliAyub007 commented Jul 26, 2017

I am having a little problem here that how can I link my account and dow do we configure our account with this. How will my account work as a chatbot on weChat or in short where will I send messages to test it? can anyone explain please. It will be very thankful.

Sorry for not following guidelines of issue but couldn't do so.

@huan
Copy link
Member

huan commented Jul 26, 2017

Did you see the Getting Start Tutorial?
https://github.com/Chatie/wechaty/wiki/GettingStarted

It's in Chinese but you could follow it without any problem because it's a live coding tutorial.

Also I'll suggest you have a look on Examples first at here: https://github.com/Chatie/wechaty/wiki/Example

@AliAyub007
Copy link
Author

AliAyub007 commented Jul 26, 2017

when I tried getting started with npm module I got these errors in console.

22:54:47 ERR PuppetWebEvent onServerDisconnect() setTimeout() bridge.init() exception: [Error: execute proxyWechaty(init) error: 503, init() without a ready angular env]

(node:53719) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: watchDogReset() watchdog reset after 60 seconds, last feed:[HEARTBEAT:[heartbeat@browser]]

here is my code:

const { Wechaty } = require('wechaty') // import { Wechaty } from 'wechaty'

const bot = Wechaty.instance() // Singleton
bot.init();

bot.on('scan', (url, code) => console.log(Scan QR Code to login: ${code}\n${url}))
bot.on('login', user => console.log(User ${user} logined))
bot.on('message', message => console.log(Message: ${message}))

@huan
Copy link
Member

huan commented Aug 18, 2017

Hello, thank you for using Wechaty.

Issues are about to fire bugs & request features only, so it's not a Support Forum.

To get help, ask questions and discuss with other developers, please join our Wechaty Developers' Home community in Wechat.

Join Wechaty Developers' Community

Wechaty is used in many ChatBot projects by hundreds of developers. If you want to talk with other developers, just scan the following QR Code in WeChat with secret code wechaty, you can join our Wechaty Developers' Home at once.

Wechaty Developers' Home

Scan now, because other Wechaty developers want to talk with you too! (secret code: wechaty)

@huan huan closed this as completed Aug 18, 2017
@Realzzz1874
Copy link

@huan hi, bro! I got the same problem when I first use wechaty, is there any ideas?

error message:

ERR PuppetWeChatBridge onLoad() exception: Error: execute proxyWechaty(init) error: 503, init() without a ready angular env
node:internal/process/promises:246

my code:

// index.js
const qrTerm = require('qrcode-terminal');
const Wechaty = require('wechaty');

const { ScanStatus, WechatyBuilder, log } = Wechaty;

function onScan (qrcode, status) {
  if (status === ScanStatus.Waiting || status === ScanStatus.Timeout) {
    qrTerm.generate(qrcode, { small: true });  // show qrcode on console

    const qrcodeImageUrl = [
      'https://wechaty.js.org/qrcode/',
      encodeURIComponent(qrcode),
    ].join('');

    log.info('StarterBot', 'onScan: %s(%s) - %s', ScanStatus[status], status, qrcodeImageUrl);
  } else {
    log.info('StarterBot', 'onScan: %s(%s)', ScanStatus[status], status);
  }
}

// get a Wechaty instance
const bot = WechatyBuilder.build({
  name: 'wechat-bot',
  puppet: 'wechaty-puppet-wechat',
})

// emit when the bot needs to show you a QR Code for scanning
bot.on('scan', onScan);

// start the bot
bot.start()
  .then(() => log.info('StarterBot', 'Starter Bot Started.'))
  .catch(e => log.error('StarterBot', e))

@Yongest
Copy link

Yongest commented Oct 12, 2022

请问现在可以了没

@Yongest
Copy link

Yongest commented Oct 12, 2022

@huan hi, bro! I got the same problem when I first use wechaty, is there any ideas?

error message:

ERR PuppetWeChatBridge onLoad() exception: Error: execute proxyWechaty(init) error: 503, init() without a ready angular env
node:internal/process/promises:246

my code:

// index.js
const qrTerm = require('qrcode-terminal');
const Wechaty = require('wechaty');

const { ScanStatus, WechatyBuilder, log } = Wechaty;

function onScan (qrcode, status) {
  if (status === ScanStatus.Waiting || status === ScanStatus.Timeout) {
    qrTerm.generate(qrcode, { small: true });  // show qrcode on console

    const qrcodeImageUrl = [
      'https://wechaty.js.org/qrcode/',
      encodeURIComponent(qrcode),
    ].join('');

    log.info('StarterBot', 'onScan: %s(%s) - %s', ScanStatus[status], status, qrcodeImageUrl);
  } else {
    log.info('StarterBot', 'onScan: %s(%s)', ScanStatus[status], status);
  }
}

// get a Wechaty instance
const bot = WechatyBuilder.build({
  name: 'wechat-bot',
  puppet: 'wechaty-puppet-wechat',
})

// emit when the bot needs to show you a QR Code for scanning
bot.on('scan', onScan);

// start the bot
bot.start()
  .then(() => log.info('StarterBot', 'Starter Bot Started.'))
  .catch(e => log.error('StarterBot', e))

请问可以了没

@Realzzz1874
Copy link

可以了,已经解决了

@shootyou
Copy link

可以了,已经解决了

请教下如何解决的?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants