Skip to content

Adding a new bot

M4rtineski edited this page Jan 5, 2025 · 4 revisions

Adding a new bot:

In lemmy-directory

  • Modify scripts/directory_to_json.py
    • Add an output for the new file with the section names

In Lemmy

  • Create a new bot account
    • Ensure it is marked as a bot
  • Verify email
    • Yawn while waiting for application to be accepted 🥱
    • (you can continue at this point, as long as it is accepted before the bot runs!)

In Google Cloud

  • Add a secret for the bot account
  • Switch to Permission and add the compute service account (search for "compute") as "Secret Accessor"
    • Click View by Roles
    • Click Grant Access
    • Type "compute" and select the service account
    • Click Role and type "acce" - select the Secret Accessor role
    • Click Save

(google cloud > console > security > secret manager)

In bestofbot

  • Switch to the community-update branch
  • Add a new line to deploy.sh, replacing the job name, title, bot account, and secret names
  • Merge the PR "[automated] Community updates"

In Google Cloud

  • Go to Cloud Run Jobs
  • Add a trigger to run the job

In TheGood.Cloud

  • Add entry for the bot to the bestofbots calendar (@chris-y will need to do this)

In Lemmy

  • Set the bot as mod after it has posted once (this allows the bot to lock the post - may change this to use a different account to avoid lots of bots being mods)