Skip to content

How to set up new Little Cases bots

Mike Lissner edited this page Nov 6, 2024 · 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 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.
    • Threads: Make sure the account is public.
  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, masto, Bluesky and Threads keys:

    • 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.

    • For Bluesky:

      • Log in to your bot's account.
      • Click Settings on the left side of the screen.
      • Scroll down to the Advanced section.
      • Click the App Passwords option.
      • Then click the Add app password button.
      • Give your application a name (this name doesn't matter).
      • Copy the password of your new application.
      • Paste the password into the access token field of the channel (the secret token should be blank)
      • Copy your handle without the @ symbol(you can find it on the profile page) and paste it into the account id field.
    • For Threads:

      • Make sure the One-Time Setup has been completed.

      • Log into the Meta developers console and go to your app's Dashboard.

      • Go to App Roles > Roles > Add People.

      • Enter the username and select the role Threads Tester.

      • Log into the account on Threads.

      • Go to Settings > Account > Website permissions > Invites.

      • Accept the invite.

      • On the server or your local machine, set the app ID and app secret from the Meta app in your .env file (either location works, but the server should have this already).

      • Run the script to get the account credentials with the following command:

          docker exec -it bc2-django python /opt/bigcases2/scripts/get-threads-keys.py
        
      • Follow instructions in CLI:

        • In a browser go to link generated by script.
        • Log into the Threads account and authorize the Meta app. This will redirect you to a bots.law view with a code.
        • Copy the code and paste it in the command line.
        • Use the information provided by the script to create the new Threads channel.
  9. Have curators create accounts. Once done, add them to the channels as a curator.

Clone this wiki locally