Giter Club home page Giter Club logo

rating-bot's Introduction

Rating-Bot

This is a simple rating bot that you can use to add reactions to any file, embedded content.

Known Problems

  • The bot adds reactions slowly.

    Currently there isn't support adding a lot of reactions, and as each requests takes about 1 second it can take a bit.

Questions/Feedback?

You can use the issues tab to submit issues. Bear in mind that this is a small project i did for fun so it might take some time.

How to Use

  1. download the Docker-Compose file

  2. Change image for the proper system

    For x86 architectures:

     services:
       ratingbot:
         image: rubeste/ratingbot:latest
    

    For ARM architectures:

     services:
       ratingbot:
         image: rubeste/ratingbot:latest-arm
    
  3. Configure Environment values

  4. Run docker-compose up -d

Environment value structure

This application uses .NET Core configuration with environment variables. it implements two Prefixes.

  • DOTNET_

    For .NET Core Specific configurations like ENVIRONMENT

    • ENVIRONMENT

      If this value is Development it will add verbose console output.

  • RatingBot_

    For Rating Bot Specific configurations like prefix

    • prefix

      A char to use as a command prefix.

    • token

      Your bot token.

    • RatingConfig__ChannelIds_{X}

      A list of ulongs representing the channel ids you want the bot to listen to.

    • RatingConfig__EmojiName__{X}

      A list of strings representing unicode emoji's or discord emotes. The first entry in the list has a value of 0, the next 1 and so on. This value is used to calculate the avarage rating.

      So if you have 4 emoji's this would be your rating: X/3.

      If the value is an unicode emoji you just have to enter that emoji into the environment variable. Otherwhise you have to give the full discord emote like this: <:your_emote:000000000000000000>

Example of each environment variable:

DOTNET_ENVIRONMENT=Development
RatingBot_prefix=!
RatingBot_token=YOUR_TOKEN
RatingBot_RatingConfig__ChannelIds__0=000000000000000000
RatingBot_RatingConfig__EmojiNames__0=0️⃣
RatingBot_RatingConfig__EmojiNames__1=1️⃣
RatingBot_RatingConfig__EmojiNames__2=2️⃣
RatingBot_RatingConfig__EmojiNames__3=3️⃣
RatingBot_RatingConfig__EmojiNames__4=4️⃣
RatingBot_RatingConfig__EmojiNames__5=5️⃣
RatingBot_RatingConfig__EmojiNames__6=6️⃣
RatingBot_RatingConfig__EmojiNames__7=7️⃣
RatingBot_RatingConfig__EmojiNames__8=8️⃣
RatingBot_RatingConfig__EmojiNames__9=9️⃣
RatingBot_RatingConfig__EmojiNames__10=🔟

rating-bot's People

Contributors

rubeste avatar

Watchers

 avatar

rating-bot's Issues

[BUG] Bot sometimes doesn't add reactions

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:
Currently unknown

Expected behavior
Reactions are added on images/embed posts

Screenshots
No reactions on image/embed posts.

Smartphone (please complete the following information):

  • Device: Android phone
  • OS: Android
  • Version Latest

Additional context
Logging information is insufficient to diagnose the issue.

[BUG] Bot chashes uppon processing deleted posts.

Describe the bug
When you delete a processed post and use the stats command it will crash.

To Reproduce
Steps to reproduce the behavior:

  1. Create image post
  2. Delete post
  3. Use the stats command
  4. See error

Expected behavior
The current statistics

Screenshots
"Error: Exception: Object reference not set to an instance of an object."

Desktop (please complete the following information):

  • OS: Windows 10
  • Version latest

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.