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 send only once one message? #134

sgaseretto opened this Issue Dec 28, 2017 · 3 comments


None yet
4 participants
Copy link

sgaseretto commented Dec 28, 2017

When I run the examples for messenger, once I send something to the bot, it starts spamming the same thing until I stop the server, how do I send a message only once and wait for the user to respond?
Here is an example of what I'm talking:


This comment has been minimized.

Copy link

wtflink commented Dec 28, 2017

Seems like your bot keep receiving the "message_echoes" event.
Set your webhook properly or filter onEcho event to stop the bot from self responding.
You can also check the official webhook setting documents for more info.


This comment has been minimized.

Copy link

sgaseretto commented Dec 28, 2017

Thanks a lot, it was the "message_echoes" event

@sgaseretto sgaseretto closed this Dec 28, 2017


This comment has been minimized.

Copy link

chentsulin commented Dec 29, 2017

Or you can filter echo events explicitly in the handler:

bot.onEvent(async context => {
  if (!context.event.isEcho) {
    await context.sendText('Hello World');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment