Skip to content

How to set up new Little Cases bots

Mike Lissner edited this page Aug 14, 2023 · 10 revisions

To make a new Little Cases bot:

  1. Create a new avatar using the template. Try to use a unique but representative color.

  2. Set things up on bots.law:

  3. Create new Twitter/Mastodon accounts:

    • Both: use [email protected] for your email address
    • Mastodon: Use mastodon.social
    • Twitter: If using Firefox, be sure to turn off Privacy Badger for this.
  4. On the twitter account, set the profile using this template:

    • Bio:

      Real-time updates on the latest cases in tech. Curated by @xxx. Hosted by @freelawproject.

      Also at @[email protected]

    • Location: Oakland, CA

    • Website: https://bots.law/little-cases/xyz/ (you got this when making the group)

    • Remove the birth date (required for sign up)

  5. Go through the Twitter settings:

    • Add an email address ([email protected])
    • Set gender to "robot"
    • Automation -> @freelawproject
    • Disable direct messages (folks can use other channels to reach us)
    • Disable discoverability
    • Disable email notifications
  6. Set up the Mastodon profile and settings:

    • Do obvious things
    • Automated deletion at six months.
  7. Make the bots follow the FLP account on Twitter/Mastodon.

  8. Set up twitter and masto keys while creating a channel for Masto and another for Twitter:

    • For Mastodon:
      • Sign into your Mastodon account.
      • Click Preferences.
      • From the list of options on the left, choose Development.
      • Then click the New button.
      • Give your application a name (this name doesn't matter).
      • Choose the scope of your application(make sure your new app has full Write permission).
      • At the bottom of the page, click the Submit button
      • You will be directed back to the Your applications page, but now you should see your application name. Click it.
      • There are three tokens in your application's page. Copy the access token.
      • Update the access token field of the Masto channel (the secret token should be blank)
    • For Twitter:
      • Log in to your bot's Twitter account.

      • On the server or your local machine, set the consumer key and secret from the @freelawproject account in your .env file (either location works).

      • Run the script using the following command:

          docker exec -it bc2-django python /opt/bigcases2/scripts/get-twitter-keys.py
        
      • Click on the link that the script produces, then click "Authorize App" (Make sure you are logged in to your bot's Twitter account!).

      • Copy the code shown on the web browser and paste it into the console running the script and press enter.

      • Copy the account ID, access token and secret access token to the channel for the bot.

  9. Have curators create accounts. Once done, add them to the channels as a curator.

Clone this wiki locally