Git Product home page Git Product logo

aura's Introduction

Aura - Discord Karma Bot

Aura is a discord bot focused on rewarding user contributions through an arbitrary point system called karma. It has the following features:

  • Give out karma on messages containing a custom list of case-insensitive keywords.
    • Cooldowns are applied one-way to each pair of thankee-giver, that means that the giver-thankee can swap while the cooldown of thankee-giver is still ticking.
    • Ignores invalid mentions like: self author mentions, bot mentions, bot thanking other users.
    • Ignores messages containing discord greentext, keywords enclosed in quatation marks.
  • Configurable Feedback on karma gain
    • Logging to a channel.
    • Thumbs up reaction to the message.
    • Affirmation Message in same channel as the thank you message.
    • or all of the above.
  • Blacklist and Whitelist Members from giving out karma.
    • Blacklisted Members on trying to give karma will get a DM specifying who to contact to dispute it.
  • Get Karma of one or multiple Members through Mentions, or user id's.
    • self karma requires no arguments.
  • Karma Profile with the Discord Profile Picture, full name (name + discriminator) or nick, total karma and karma breakdown by top x channels configured.
    • single mention only.
    • self profile requires no arguments.
  • Karma Leaderboard globally or per channel
  • provide optional argument of days to get a time restricted leaderboard
  • Reset all Karma of a Member in a guild, this currently has no undo functionality.
  • Delete karma from Members on message delete, reaction clear and reaction removal.
  • Change most configuration on the fly by providing keys from the config.yaml.
  • Module Model, enable and disable features you don't need or like.
  • Karma Help Commands to provide you with all the information on aura and how it works, what configuration parameters mean etc.
  • Change Permission of every command but the help command, disable the help module if you don't need it.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

This Bot requires a privileged intent: members. This Bot requires a mongodb database

To run this bot you need to manually fill out the following values in the config.yaml.example or create config.yaml with the following fields filled out. If you are filling out the example file, you can use the create_config python file to create a config.yaml out of the example file.

token: <Your Bot Account Token>
prefix: <prefix>
role:
    admin: "<Exact Name of Admin role>"
owner: <id of bot-owner>
everything under the database key

Every other value can be updated by executing <prefix> config <key> or config <key> <key> etc. for the according key in the config yaml with a user that has the configured admin role.

Running it locally

Since this bot has a docker-compose file, all you need to start your own Aura locally is:

docker-compose up --build

or

docker-compose down ; docker-compose build ; docker-compose up

while being in the root directory of aura.

Running the tests

pip install mongomock
python -m pytest tests/ or pytest tests/

Requirements

  • see the requirements file for the python app dependencies
  • Docker
  • Docker-Compose compatible with 3.7
  • MongoDB (at least 4.2.5)

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to the project.

Versioning

This project uses SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Georg Göring - Original Author - arkencl

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Attribution

This README.MD is adapted from the following Template.

aura's People

Contributors

arkencl avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

isconic

aura's Issues

Oddball non relevant karma issued?

you can find tons of complaints online. For me the straw that broke the camel's back was this one : you can't update only one dependency (transitively) the dev closed it with "not supported, thanks for the feedback"

Screen Shot 2020-05-26 at 7 25 49 AM

changes on the config.py file and code style

Heya 👋

I was about to add a new feature to aura but then I realized the config file was repeating a lot of the code, and I thought of fixing it first.

I've previously made a pr for fixing code style with flake8 and replacing requirements.txt with pipenv (#3). I've seen the review, and I agree with it for the most part, but there is a possibility that the code can be prettified to look better for anyone reading the code.

I want to add the following things:

  • Flake8 - For cleaning up the code and managing type annotations just to make the ide a bit smarter.
  • Pipenv - For adding Flake8 as a dev package (we could use requirements-dev.txt, but pipenv makes it easier)

I've already made a lot of changes in the config.py file: https://hasteb.in/xujubexe.py
I will also reformat all of the code to match the flake8 standards.

Does this sound like a good idea?

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.