Code Monkey home page Code Monkey logo

mastodon-group-bot's Introduction

Mastodon group bot

This is a bot which implements group functionality in Mastodon.

Features

  • Repost toots
  • Welcome message of new members
  • Limit of toots per hour
  • Duplicate protection
  • Reply protection (if thread broken)
  • Order limit
  • Notification cleaning
  • Logging
  • Admin commands

Admin commands

  • boost <Toot ID>
  • unboost <Toot ID>
  • delete <Toot ID>

Configuration

The bot is configured in a JSON file that looks like this:

{
    "Server":               "https://example.com",
    "ClientID":             "0000000000000000000000000000000000000000000",
    "ClientSecret":         "0000000000000000000000000000000000000000000",
    "AccessToken":          "0000000000000000000000000000000000000000000",
    "WelcomeMessage":       "We have a new member in our group. Please love and favor",
    "NotFollowedMessage":   "you are not followed",
    "Max_toots":            2,
    "Toots_interval":       12,
    "Duplicate_buf":        10,
    "Order_limit":          1,
    "Del_notices_interval": 30,
    "Admins":               ["[email protected]"]
}

Building

go mod init mastodon-group-bot
go mod tidy
go build

Setup services

For first make dirs, copy config and binary

mkdir /etc/mastodon-group-bot
mkdir /var/lib/mastodon-group-bot
mkdir /var/log/mastodon-group-bot
chown nobody /var/lib/mastodon-group-bot
chown nobody /var/log/mastodon-group-bot
cp config.json /etc/mastodon-group-bot/config.json
cp mastodon-group-bot /usr/bin/mastodon-group-bot

Systemd

cp ./services/systemd/mastodon-group-bot.service /etc/systemd/system/mastodon-group-bot.service

OpenRC

cp ./services/openrc/mastodon-group-bot /etc/init.d/mastodon-group-bot

Usage

mastodon-group-bot -config <path> -db <path> -log <path>

mastodon-group-bot's People

Contributors

saiv46 avatar

Stargazers

 avatar

Watchers

 avatar

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.