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

newFollowers don't works #18

Closed
TapsHTS opened this issue Aug 28, 2020 · 2 comments
Closed

newFollowers don't works #18

TapsHTS opened this issue Aug 28, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@TapsHTS
Copy link

TapsHTS commented Aug 28, 2020

I want to send a message if the user follow the bot, but nothing happens, no error, no message.

clienti.on('newFollower', (user) => {
    console.log('╭───────────────────────────╮')
    console.log('| ➜    Nouveau follower !  |')
    console.log('╰───────────────────────────╯')
    user.send('🛬 Merci d\'utiliser pro_note_ !');
});```
@Androz2091 Androz2091 added the bug Something isn't working label Aug 28, 2020
@TapsHTS TapsHTS closed this as completed Aug 31, 2020
@TapsHTS TapsHTS reopened this Aug 31, 2020
@TapsHTS
Copy link
Author

TapsHTS commented Aug 31, 2020

at Request.handleResponseError (/home/container/node_modules/instagram-private-api/dist/core/request.js:125:16)
at Request.send (/home/container/node_modules/instagram-private-api/dist/core/request.js:53:28)
at async DirectThreadRepository.broadcast (/home/container/node_modules/instagram-private-api/dist/repositories/direct-thread.repository.js:176:26)
at async DirectThreadEntity.broadcast (/home/container/node_modules/instagram-private-api/dist/entities/direct-thread.entity.js:180:26)
at async DirectThreadEntity.broadcastLink (/home/container/node_modules/instagram-private-api/dist/entities/direct-thread.entity.js:69:16)
(node:24) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)```

Code: ```
clienti.on('newFollower', async (user) => {
    console.log('╭───────────────────────────╮')
    console.log('| ➜    Nouveau follower !  |')
    console.log('╰───────────────────────────╯')
    if (!user.privateChat) await user.fetchPrivateChat()
    user.privateChat.sendMessage('🚀 Merci d\'utiliser pro_note.bot!')



@kaiquebarreto
Copy link

I'm having the same problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants