Skip to content

iprentic/nbahottakes_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Glitch Twitter bot template

Tweetin'

This is a template for making fun Twitter bots with Glitch and the Twit node.js library. For a bit more advanced version of this starter project see twitterbot-advanced.

A quick tutorial

  1. Create a new Twitter account and a new Twitter app. (See how.)
  2. Update the .env file with your Twitter API key/secrets and change the BOT_ENDPOINT (it could just be random letters).
  3. Update server.js with some cool Twitter bot code. (Make sure your bot follows Twitter's rules and is overall not a jerk.)
  4. Set up a free service (Uptime Robot, or a similar one) to wake up your bot every 25+ minutes and tweet. Use https://YOUR_PROJECT_NAME.glitch.me/BOT_ENDPOINT as a URL to which to send the HTTP request.

The included example tweets out "hello world 👋". Check out the Twit module documentation for more examples of what your bot can do.

You can find more tutorials and open source Twitter bots on Botwiki. Be sure to join Botmakers and submit your bot to Botwiki :-)

More starter projects

For more bot starter projects on Glitch, check out the official Botwiki page on Glitch.

Note on bots that auto-reply to DMs/@ mentions

Apps hosted on Glitch are automatically put to sleep after 5 minutes of inactivity (that is, if nobody opens your app in a browser window or it doesn't receive any data).

Twitter's API doesn't send requests to your app, instead your app has to poll Twitter for data.

See this Glitch starter project where i work around this limitation and make a Twitter bot that responds to DMs and @ mentions (with a 25 minute delay).

Support Botwiki/Botmakers

🙇

Powered by Glitch

\ ゜o゜)ノ

About

NBA Hot takes bot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published