Node Bots

JaxNode, August 2021

About Me

fek.io/blog

youtube.com/c/polyglotengineer

github.com/davidfekke

@jaxnode @polyglotengine1

What is a Bot

  • Program that can monitor stream or events, and act
  • Typically used to respond or notify end users
  • Leverage existing APIs

Bot examples

  • Twitter Bots
  • Slack Bots
  • Discord
  • Telegram
  • Chat bots

Bot Frameworks

  • Microsoft Bot Framework
  • MBF works with Azure
  • NLP.js Framework

Twitter

  • 'twit' module
  • Requires twitter API keys
  • consumer_key, consumer_secret, access_token, access_token_secret
  • Handle events on a Stream
  • Post Tweets to Twitter

Slack

  • Create Slack Bots
  • Github app for Slack
  • Build Bot with SlackBot

Discord

  • Build bots for Discord
  • Can use Discord.js

Hosting Bots

  • Deploy to dedicated server
  • Can use hosted services like Heroku if you add http listener to application
  • Possibly use a process manager to keep service running like PM2, restart bot if it fails

Bot examples

  • 66% tweeted links are from bots
  • SPAM (Evil)
  • Helper, answer questions
  • Schedule messages
  • Integrate with other apps
  • CI/CD with Github

Non-evil Twitter

  • Automated Technical help
  • Automate delivery of news or price changes
  • Stock information

Demo 1

  • Create stock watcher

Demo 2

  • JaxNode Bot

Demo 3

  • Slack GitHub Bot

Demo 4

  • Slack JaxNode Bot

Code examples

Questions?

Node Bots

By David Fekke

Loading comments...

More from David Fekke