Coder Social home page Coder Social logo

aonghasmackay / mackaysmememachine Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 410 KB

Discord bot for score keeping based on custom emoji reactions

License: GNU General Public License v3.0

JavaScript 99.62% Shell 0.38%
discord discord-bot discord-js javascript nodejs sequlize ascii-table cron bot express

mackaysmememachine's Introduction

MackaysMemeMachine

Discord bot for score keeping based on custom emoji reactions. Work in progress. Please provide credit if you fork the project

How it works

The bot is primarilly built with node (v16.17.0), discord.js and Sequelize.

Additionally it uses the cron package to schedule and run cron jobs and the ascii-table3 package to format tables. A simple healthcheck is built using Express for use with app hosting services such as Render.

Features

  • Score keeping based on two custom emoji (configurable) reactions
  • A limited balance of points to be given or taken away, by each user, per day
  • Cron jobs to reset users balance per day or to assign, and record, a winner for the month and reset the scoreboard
  • An outputable monthly scoreboard & overall leaderboard
  • The ability to mute the bot
  • Error & Info logging
  • Debug mode with increased logging and the ability to react to your own messages
  • Simple healthcheck at the endpoint /healthcheck

Scoreboard

Leaderboard

Console & Logging

Limitations

As this project was designed as a side project to learn node it is has several limitations.

The bot is not intended for use on multiple servers and must have a primary server and admin assigned in the config. The database schema also makes no distinction between servers. This means users balances, scoreboards and the monthly leaderboard are all shared between servers.

The bot is not set up to be distributed. If you wish to use or fork the bot then a config.json file must be provided following the configTemplate.json structure.

Known Issues

  • Users can react, then remove the reaction, then react again to stack points on a single post

Setup

Please remember this bot was not designed to be distributed and may require some tinkering to work on other servers!

  1. Setup a bot application in the discord developer portal so that you have an api token. Some familiarity with discord bot permissions will be needed.
  2. Create a config.json file matching the format of the configTemplate.json. For app hosting services this may need to be done via their platform.
  3. Add the bot to your server
  4. Run the setup.bash script

mackaysmememachine's People

Contributors

aonghasmackay avatar

Stargazers

 avatar

Watchers

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