Code Monkey home page Code Monkey logo

automod's Introduction

Automod

A modular automated moderation bot for the Threadiverse that can be easily configured using a text file.

Created for feddit.dk and feddit.nu on Lemmy. These instances are small and no other moderation tools are necessary besides the thread scheduler at the moment, which is why it is the only module.

Modules that perform other moderation tasks can be added upon request.

Configuration

Currently, AutoMod only supports the Lemmy API.

Set up the following environment variables by copying the provided .env.template file and renaming it to .env. Update the values in the .env file according to your cross-posting bot's Lemmy account and operating instance.

  • LEMMY_USERNAME: Username for the bot's Lemmy account
  • LEMMY_PASSWORD: Password for the bot's Lemmy account

The bot uses a config.yaml file to determine the actions it will carry out. Adjust the values in the config.yaml file according to your requirements. Make sure that the destination Lemmy communities have been created before deploying the bot.

Examples

This configuration file tells AutoMod to create a thread named "Free Talk Friday" at 7AM CET every Friday.

lemmy_base_uri: https://lemmy.myinstance.com # The base instance URL without anything trailing like /api/v3/
timezone: 'Europe/Berlin' # Timezone as defined in the tz database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

scheduled_posts:
  - community: 'my_lemmy_community'
    title: 'Free Talk Friday'
    content: |
      ## Happy Friday!

      **This is the weekly free talk thread at My Lemmy Community.**

      Please feel free to discuss anything and everything happening in your life! Remember to respect the forum rules:
      - Don't post things that are related to the Drama Controversy of $CURRENTYEAR.
      - Everything you post on the Internet will be here forever. Don't reveal any personally identifiable information.
    external_link: # Leave empty to not add a link
    frequency_unit: 'weeks' # minutes, hours, days, weeks
    frequency: 1 # Schedule the post every X minutes/hours/days/weeks
    day: 'friday' # Day of the week if frequency_unit is week
    time: '07:00' # 24-hour time if frequency is 'day' or 'week'. Minutes or seconds otherwise. See https://schedule.readthedocs.io/en/stable/examples.html for more info

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.