All Projects → abachman → pat-the-campfire-bot

abachman / pat-the-campfire-bot

Licence: WTFPL license
A Campfire chat bot in node.js, intended to run on Heroku. Built for internal use at Figure53 but you might like it.

Programming Languages

coffeescript
4710 projects
shell
77523 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to pat-the-campfire-bot

Cleve
Open sourced Discord chat bot powered by brainshop.ai
Stars: ✭ 30 (+114.29%)
Mutual labels:  chatbot
api-ai-workshop
Dialogflow Workshop Material. This can be used to create a Conversational Agent for a simple Linear Conversation using Dialogflow
Stars: ✭ 56 (+300%)
Mutual labels:  chatbot
eve-bot
EVE bot, a customer service chatbot to enhance virtual engagement for Twitter Apple Support
Stars: ✭ 31 (+121.43%)
Mutual labels:  chatbot
naver talk sdk
NaverTalk Python Library(네이버 톡톡 파이썬 모듈)
Stars: ✭ 16 (+14.29%)
Mutual labels:  chatbot
DSTC6-End-to-End-Conversation-Modeling
DSTC6: End-to-End Conversation Modeling Track
Stars: ✭ 56 (+300%)
Mutual labels:  chatbot
kanna kobayashi
Kanna Kobayashi's open source repository (Discord Bot)
Stars: ✭ 16 (+14.29%)
Mutual labels:  chatbot
gpt-j
A GPT-J API to use with python3 to generate text, blogs, code, and more
Stars: ✭ 101 (+621.43%)
Mutual labels:  chatbot
cleverbotfree
Free alternative for the Cleverbot API
Stars: ✭ 56 (+300%)
Mutual labels:  chatbot
Microsoft-chatbot
Microsoft chatbot build using NLTK-Chatbot and django
Stars: ✭ 34 (+142.86%)
Mutual labels:  chatbot
Splain
small parser to create more interesting language/sentences
Stars: ✭ 15 (+7.14%)
Mutual labels:  chatbot
bot5
Bot Friday Club - BOT5
Stars: ✭ 38 (+171.43%)
Mutual labels:  chatbot
Plants-Identification
🌻 Deep learning project of Taiwan plants classification and detection with chatbot implementation
Stars: ✭ 18 (+28.57%)
Mutual labels:  chatbot
rivescript-java
A RiveScript interpreter for Java. RiveScript is a scripting language for chatterbots.
Stars: ✭ 60 (+328.57%)
Mutual labels:  chatbot
sugaroid
The not-that intelligent, but cute Artificially Intelligent bot, created when I was bored.
Stars: ✭ 12 (-14.29%)
Mutual labels:  chatbot
Chatbot
A Deep-Learning multi-purpose chatbot made using Python3
Stars: ✭ 36 (+157.14%)
Mutual labels:  chatbot
virtual-assistant
Virtual Assistant
Stars: ✭ 67 (+378.57%)
Mutual labels:  chatbot
charles-rest
Github chatbot and web-content indexer/searcher
Stars: ✭ 24 (+71.43%)
Mutual labels:  chatbot
VirtualBLU
A Virtual Assistant for Windows PC with wicked Qt Graphics.
Stars: ✭ 41 (+192.86%)
Mutual labels:  chatbot
botkit-storage-datastore
Google Cloud Datastore storage module for Botkit
Stars: ✭ 13 (-7.14%)
Mutual labels:  chatbot
messenger-bot
A Node bot server for the Facebook Messenger Platform
Stars: ✭ 23 (+64.29%)
Mutual labels:  chatbot

Pat the Campfire Bot

last update: 2011-09-03

Is what it is, does what it says.

node.js so that it runs on Heroku. What do you know about bacon strips?

There are lots of dangling features, some extraneous code and the tests and specs are more like sanity checks. Feel free to ignore anything ugly.

This is my, "hey, I should learn node.js" project and most of it was written in a burst of activity over the weekend of 2011-07-23.

dependencies

Pat the bot is developed against:

  • Javascript
    • node - 0.4.7
    • npm - 1.0.18
    • underscore - 1.1.7
    • dom-js - 0.0.1
    • mongoose - 1.7.3
    • jasmine-node - 1.0.6 (development)
  • Ruby
    • heroku - 2.3.6
    • foreman - 0.18.0

setup

local

1. install node

make sure you have node installed. Version 0.4.7 if you want to run on heroku.

brew install node -v0.4.7

Do whatever it says to get your NODE_PATH env variable set up.

2. install npm

run the script, that should be enough to get started.

3. clone the repo

that's a secret

4. install dependencies

I think you cd into the project directory and type npm install .. Not sure, but I have them installed, so maybe that worked? YMMV.

To install mongo, all I did was brew install mongodb and everything just worked.

5. (optional) heroku support

You'll need ruby for this. Get it. I recommend rvm.

  1. gem install heroku
  2. gem install foreman

That's all.

heroku

  1. git push heroku master
  2. setup 30m ping on http://www.montastic.com/ to make sure the app doesn't get shut off. Heroku automatically turns off any dynos that haven't had a request in the last hour.

hacking

local env

I keep a .profile file in my project directory and source it in my shell before I start working. This lets me keep private stuff out of the code. It looks like this:

export campfire_bot_token=12345thisisthetokencampfiregavemeweirdhuh
export campfire_bot_account=zoomakroom
export campfire_bot_room=100000     # staging
export campfire_service_room=100000 # staging
# export campfire_bot_room=900000   # production
export campfire_logging_room=100000 # bot chatter
export PATH=$(npm bin):$PATH

I think that last PATH=$(npm bin):$PATH line is what keeps me, node, foreman, and npm happy in my local dev environment.

Wherever you deploy, you'll need those five campfire_* environment variables.

NOTE: campfire_bot_room can be a comma separated string, Pat can listen to multiple rooms now!

running the app

Code you write lives in src/. Everything in lib/ is either straight vendored, or generated by cake build or foreman start coffee.

When working on the code, running foreman start coffee is recommended to make sure lib/ stays up to date. To run the application, run node lib/bot.js or foreman start web. Plain foreman start will run the coffee script updater and the web service, but the code won't be up to date when it starts (race condition) and the application server doesn't auto-load updated modules. So, you'll have to stop and restart the server to see your changes.

plugins

Plugins live in src/plugins. All plugins export an object with a listen property which is a function. A basic echo plugin would look like this:

src/plugins/echo.coffee

module.exports =
  listen: (message, room) -> room.speak(message.body, console.log)

The listen method should take two arguments, message the message object handed over from Campfire and room, the Campfire room the message came from.

If you want to access the storage classes (User, Quote, Counter, etc.) you will have to require ./lib/store in the plugin. Take a look at src/plugins/phrases.coffee for an example.


Based on "Quack-Bot: a campfire bot for Quick Left"

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].