Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.

Commit 1ca897c

Browse files
committed
Rename to old script. Add warning for missing token vars.
1 parent 7fba20c commit 1ca897c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/scripts/twitter_search.coffee renamed to src/scripts/twitter_mention.coffee

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ module.exports = (robot) ->
3030

3131
key = process.env.HUBOT_TWITTER_CONSUMER_KEY
3232
secret = process.env.HUBOT_TWITTER_CONSUMER_SECRET
33+
if not key or not secret
34+
console.log "twitter_mention.coffee: HUBOT_TWITTER_CONSUMER_KEY and HUBOT_TWITTER_CONSUMER_SECRET are required. Get your tokens here: https://dev.twitter.com/apps"
35+
return
36+
3337
twitterauth = new oauth.OAuth2(key, secret, "https://api.twitter.com/", null, "oauth2/token", null)
3438

3539
twitterauth.getOAuthAccessToken "", {grant_type:"client_credentials"}, (e, access_token, refresh_token, results) ->

0 commit comments

Comments
 (0)