Git Product home page Git Product logo

sweetiebot's Introduction

Sweetie Bot

Sweetie Bot is an administration bot for the /r/mylittlepony Discord chat. Her primary function is anti-spam, by detecting potential spammers, silencing them, and deleting their messages. This helps immunize the chat against bot raids. She also keeps a log of the chat and it's users, and provides a command to find the last message that pinged a given user.

Compiling

Sweetie Bot uses Go and MariaDB for a database backend. Install at least Go 1.5 (required for some language constructs) on your computer and MariaDB 10.1 (required for utf8mb4 support). After cloning the project, sweetiebot.sql is included in the main folder directory. Run it from HiediSQL or your command line and it will create the necessary sweetiebot database.

Three files are necessary for sweetiebot to run that are never uploaded to the git repo:

  • db.auth: Database connection string
  • token: Bot token used for login. Create an application and turn it into a Bot User to get one.

These files must in the root directory of wherever main.exe is compiled to. For testing purposes, it is sufficient to navigate to /sweetiebot/main in your command line and compile it there by typing go build, which will create /sweetiebot/main/main.exe. An example config.json file is included in /sweetiebot/main for testing purposes.

If your MariaDB installation uses default settings, your db.auth file should look like this:

root:PASSWORD@tcp(127.0.0.1:3306)/sweetiebot?parseTime=true&collation=utf8mb4_general_ci

If you get compiler errors, sweetiebot has two dependences you should get:

  • go get github.com/go-sql-driver/mysql
  • go get github.com/bwmarrin/discordgo

Functionality

Modules

Anti-Spam

Tracks all channels for spammers. If someone posts more than n messages in m seconds, they will be silenced, their messages deleted, and the moderators will be notified.

Emotes

Keeps a list of banned emotes that are either siezure inducing or way too big, and deletes any messages that use them.

Pings

Tracks any messages that ping a user, including @everyone. This information can be used by the !lastping command to get the last message that pinged a user and any surrounding context.


©2016 Erik McClure

sweetiebot's People

Contributors

tallonrain avatar

Watchers

David M avatar James Cloos 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.