FoxTail
みこーん。
Twitter bot generator for node.js
You can easily add plugin to your bot.
Installation
npm install foxtail
Easy Example
1. Setup FoxTail.
index.js
var FoxTail = ; var fox = consumer_key: ... consumer_secret: ... access_token: ... access_token_secret: ...; // show timelinefox; // reply to wordsfox; fox;
2. Run
$ node index.js
Example
If you want to separate plugins, you can place the plugin file into the plugin folder.
plugin/hello.js
module { fox;};
index.js
var FoxTail = ;var Path = ; var fox = consumer_key: ... consumer_secret: ... access_token: ... access_token_secret: ...; fox;fox;
Very Easy!
Using foxtail npm plugins
If you want to create bot more easily, You can use the npm plugins.
This is an example.
This plugin is that reply 'hello' to 'world' in the timeline.
First, Install foxtail plugin.
$ npm install foxtail-hello-world
Add plugin name into json file.
fox.json
['foxtail-hello-world']
Add loadNpmScript
to index.js.
index.js
var FoxTail = ;var Path = ; var fox = consumer_key: ... consumer_secret: ... access_token: ... access_token_secret: ...; fox;fox;
YEAR!!!!
Response Action
Tweet
fox;
Reply
fox;
Retweet
fox;
Favorite
fox;
Schedule Tweet
install node-cron
$ npm install cron --save
var cron = ; var job = '0 0 0 * * *' { fox;} null false; module { fox;};
Development
# watch
npm run watch
# build
npm run build
# test
npm test
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
License
MIT