Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hexylena/freiburg-galaxy-bot
https://github.com/hexylena/freiburg-galaxy-bot
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/hexylena/freiburg-galaxy-bot
- Owner: hexylena
- Created: 2017-08-08T14:58:47.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-08T17:54:10.000Z (over 7 years ago)
- Last Synced: 2024-10-17T13:58:23.663Z (about 1 month ago)
- Language: JavaScript
- Size: 22.5 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FreiburgerBot
FreiburgerBot is a chat bot built on the [Hubot][hubot] framework. It was
initially generated by [generator-hubot][generator-hubot].Someday the galaxy portions will be abstracted out into a hubot-plugin, but give me a week or two ;)
## Running FreiburgerBot Locally
You can test your hubot by running the following, however some plugins will not
behave as expected unless the [environment variables](#configuration) they rely
upon have been set.You can start FreiburgerBot locally by running:
```
ROOM="Galaxy/Lobby" TOKEN= HUBOT_LOG_LEVEL=debug ./bin/hubot -a gitter
```the token can be obtained from https://developer.gitter.im/apps
## Running Under Your Account
If you wish to run it under your account (i.e. it impresonates you) since gitter makes it complex to have multiple accounts / bot accounts...
you'll need to edit `node_modules/hubot-gitter/index.js` and comment out the line about not processing messages sent by the bot.
```javascript
// Listen to room message
const events = room.streaming().chatMessages()
events.on('chatMessages', ({ model }) => {
// Do not process messages sent by bot
//if (model.fromUser == null || model.fromUser.id === this.user.id) returnmodel.fromUser.room = room
const message = new TextMessage(model.fromUser, model.text, model.id)
this.receive(message)
```