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

send message for channel by channel id #17

Closed
kyubuns opened this issue Dec 17, 2015 · 1 comment
Closed

send message for channel by channel id #17

kyubuns opened this issue Dec 17, 2015 · 1 comment

Comments

@kyubuns
Copy link

kyubuns commented Dec 17, 2015

I want to write ping/pong code.

bot.on('message', function(data) {
  if(data.type !== "message" || data.text !== "ping") return;
  bot.postMessageToChannel(data.channel, 'pong'); // but, data.channel is channelID
});

can i do it?

@kyubuns
Copy link
Author

kyubuns commented Dec 17, 2015

ok,

bot.postMessage(data.channel, 'pong');

solved.

@kyubuns kyubuns closed this as completed Dec 17, 2015
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

1 participant