Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Adds bot.replyIntent() #100

Closed
wants to merge 2 commits into from
Closed

Adds bot.replyIntent() #100

wants to merge 2 commits into from

Conversation

RafaelCosman
Copy link
Contributor

Usage:

bot.replyIntent(message, "greeting");

Will hit http://www.chatamize.com/api/v1/intent?api_key=[your api key]&intent=greeting and will reply with the message returned. See chatamize.com to manage your messages.

As of 73374c0, intents-chatamize passes all tests with npm test.

Test
    ✓ should have a token
    ✓ should have Botkit instance

  Botkit
info: ** No persistent storage method specified! Data may be lost when process shuts down.
info: ** Setting up custom handlers for processing Slack messages
info: ** API CALL: https://slack.com/api/rtm.start
notice: ** BOT ID:  intent-wit-bot  ...attempting to connect to RTM!
    ✓ should start and then stop (1782ms)
info: ** No persistent storage method specified! Data may be lost when process shuts down.
info: ** Setting up custom handlers for processing Slack messages
info: ** API CALL: https://slack.com/api/rtm.start
    ✓ should have fail with false token (171ms)

  Log
    ✓ should use an external logging provider (177ms)


  5 passing (2s)

});
};

console.log('sending request');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary console.log

@anonrig
Copy link
Contributor

anonrig commented Jan 24, 2016

Will appreciate if you write a test for this function.

@RafaelCosman
Copy link
Contributor Author

Closing this PR. Please see discussion in https://dev4slack.slack.com/messages/botkit-wit/.

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

Successfully merging this pull request may close these issues.

2 participants