Catalog npm
Back to packageRELEASE DETAILS

1.4.4

npm

5m5v-bot

Twitter Bot That Retweets People Who Are Considering Veganism

Published26 Sept 2019
Direct dependencies3
Transitive dependenciesNot calculated

README

Current package documentation

5M5V Bot

Fork from plorry/VegAssist to retweet people looking for support going vegan for 5 Minutes 5 Vegans. https://5minutes5vegans.org

This bot tracks usage of the term "vegan" - and its translated variants depending on the config - on Twitter's public stream, and processes each item, looking for exact matches on an array of preset phrases. This bot can be setup for multiple authorised accounts for the same app, retweeting messages matching only certain filters to only certain accounts.

Implements full verification of all supplied API credentials, to avoid potential headaches.

API Credentials

Visit https://developer.twitter.com/apps to register your own app and obtain the credentials to use. To register more users under your app, visit https://5minutes5vegans.org/twitteroauth to grant permission and obtain their access tokens.

Installing

Yarn

  1. Run yarn add 5m5v-bot to install the bot to your project
  2. Copy the 5m5v-config.example.yaml file in node_modules/5m5v-bot into your own project under 5m5v-config.yaml and configure the bot
  3. Run yarn 5m5v-bot in the directory of your project to run the bot

You can install the bot globally to your system with yarn global add 5m5v-bot instead. From then you can run yarn 5m5v-bot from any folder, as long as it contains a config file.

Manual

  1. Clone this repository
  2. Run yarn install in the directory that you cloned this repository into
  3. Copy the 5m5v-config.example.yaml file to your own 5m5v-config.yaml and configure the bot
  4. Run node . in the directory of the repository to run the bot

Configuration

The configuration is loaded from 5m5v-config.yaml in the working directory, which is likely either the directory of your cloned repository or the directory of your project where you installed the node package. The configuration format is YAML, with its options listed below.

consumer_key

You find this in your app on Twitter under "Keys and tokens" -> "Consumer API keys". It's listed as "API key".

consumer_secret

Underneath the previous key, listed as "API secret key".

users

A list containing all users to retweet with. The first user listed will be used to listen to the Twitter stream with.

users.access_token

  • Available for your developer account underneath the last two keys under "Access token & access token secret". It's listed as "Access token".
  • For other accounts this is the oauth_token, obtainable at either https://5minutes5vegans.org/twitteroauth or your own OAuth implementation.

users.access_token_secret

  • Available for your developer account underneath the previous key, listed as "Access token secret".
  • For other accounts this is the oauth_token_secret, obtainable at either https://5minutes5vegans.org/twitteroauth or your own OAuth implementation.

users.filters

A list of filters that this user will be retweeting matches from.

exclude (optional)

A list of keywords that if found in a Tweet will exclude that Tweet from being retweeted.

delaytime (optional)

The time to delay retweets with once a matching Tweet has been found. Defaults to two minutes.

Running the tests

Simply run yarn test

Disabling retweets

Retweets can be disabled for testing purposes by using the argument --dry-run, e.g. node . --dry-run. In dry run mode, matching tweets will be logged to the console but not retweeted.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 3

Native requirements
3 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
js-yaml
Environment
{
  "local_name": "js-yaml",
  "alias": false,
  "peer_metadata": null
}
^3.13.1runtime
twit
Environment
{
  "local_name": "twit",
  "alias": false,
  "peer_metadata": null
}
^2.2.11runtime
mocha
Environment
{
  "local_name": "mocha",
  "alias": false,
  "peer_metadata": null
}
^6.2.0development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "5a1ccd31c71055db16d726a3c177fe7c939a4644",
  "integrity": "sha512-uLJln/34K9HDdjp78AJ7w4xejoxHVbp/SjUtuWBA2ahVm2xm3dax8ZfWz7L1Fi+AdvT34srhk6SDLthQN5YfuA==",
  "tarball": "https://registry.npmjs.org/5m5v-bot/-/5m5v-bot-1.4.4.tgz",
  "fileCount": 32,
  "unpackedSize": 60350,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjIK3CRA9TVsSAnZWagAAD6QQAJbQz/QgyDDwE80ne9a8\nAP0E9KWcFLGPWSJOANY9fAbdIJsF9UavctF8kvZWIRhtWqWB5k7fXUiQHnrf\nUU46KZ1/N6yCf84wCiouPj7t3SqwsCgOUj/6ZJ5JOe/qGcewvZLG9wMIuMkh\nLIrnUZ4SRaCWrDi1EcKeYOKb7bJpcTPlZ1swBFIJ1zqJbhvHzwC9Ld/Y+QI1\noJZeeNhBWjqqJe6MvRp/68UIiOnrX0XWOPceUrVTU/WDlUl+1SIOtyobel5i\nG6KZcU/wPg/RTvxKc7aJUX65GzKkKv7GaqXtsilZ7Q27o6ImDSOnU0oSkaR6\n2yztED5Mlv1LQA8dM/gHQQDtwyqWfEEX83ym6tn8/3Ki8OpMWlMdxni3jnXA\nszD+e0Pbfg74KuwwKAeAXsbxi5V4I4K3+tq3W0T8E/BpvLhI4nVWhYmuB2sL\npGY+s+JK5T/QPNLpofjWUh2PrUtX7RhsMGsziO8QTjAxLw5lKtTppOLVI6th\nlY+SNfosto7/PPc74Bhj31IFyJzRBwmNWDjpc9PPUed/fv6WzZ8kXVgO+5pm\nSgNcHlT3iIKZ+6URblcOx0cqp+WgBkIsA+cpzv/GFh2vV/fcWqakTxEz60dA\nlQ2OkaRyM8mjaihjaN9dIEuDAngzxP4z7B5phSbNzkiHAPhnaaCkix59e1vU\nIYAY\r\n=l/mq\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIF3Ha+UMtSykMvjFWdOIuk8HL531YMdoeQgqkyibJpJdAiEA4cI3ZpqdoUAQdD4isILSbRAEBsk3lejng+3UoeHsWWw="
    }
  ]
}

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 20:37 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:227d24bb5992fe4de68c617f54d57ee4bd8dde18686182d9d71633661007c730

Other collected versions

1.5.128 Sept1.5.028 Sept1.4.626 Sept1.4.526 Sept1.4.323 Sept1.4.223 SeptView all collected versions →