Coder Social home page Coder Social logo

s0tho / iiwb Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 738 KB

All-in-One administration discord bot with visualization tools

License: GNU General Public License v3.0

Dockerfile 0.82% HTML 2.72% CSS 1.47% Python 91.60% TypeScript 3.24% PowerShell 0.06% Shell 0.08%

iiwb's Introduction

If I Were a (discord) Bot

This is a work in progress. Current objective is to have a all-in-one administration bot connected to a database and an application for administration and data visualisation purpose. Techs are:

  • Python for the bot.
  • React.JS for the app.
  • Couchbase for the database.

Getting Started

create your .env file

cp .env.sample .env

Fill up or change information as you need. You must also have a discord bot token. Once you have your token, fill up BOT_TOKEN= in the .env file.

If you don't change COUCHBASE_DATA_PATH, then:

mkdir volumes/db/data

Install docker and docker compose and build the application:

docker compose build

Launch the application

docker compose up

For now, dockerfiles are only configured for development.

TODO

Bot

  • Hot Reloading of Python and/or discord.py cogs
  • XP distribution and xp curve for messaging and vocal time
  • Clear message function
  • Connection to Database

App

  • XP visualisation
  • Connection to Database
  • Oauth2 with discord (by default, only member should be able to see the website)

DB

  • Automatic setup

iiwb's People

Contributors

s0tho avatar

Watchers

 avatar  avatar  avatar

iiwb's Issues

XP Curve

Is your feature request related to a problem? Please describe.
We need to have an xp system that takes vocal time and textual production into account.

Describe the solution you'd like
Typical formula would be xp_lvl = 5*(lvl-1)^(2)+50*(lvl-1)+100 but ideally we could change it as well as change the range of xp gained per message or per vocal time. We should be able to choose between registering xp only from text, only from vocal or from both.

We should also take into account import from MEE6. So if someone has 45k message with 1m XP on mee6, we should be able to transfer this notion even if the formula and the range isn't the same.

The bot should also handle role promotion when a user attain a defined threshold

any other idea?

Clear function

Describe the solution you'd like
We should be able to clear:

  • X messages in a given channel
  • X messages from member Y in a given channel (or everywhere to remove spam maybe)

messages shouldn't be erased from the db but maybe we could mark them as hidden.

Linked to #4

Polls creation

Describe the solution you'd like
Being able to create poll and registering the result into the database, something like

{
    "id":1,
    "question": "do you like chocolate?",
    "created": "DATE",
    "finished":"DATE",
    "answers": {
        "yes":["user1", "user2"],
        "no":[]
    }
}

Text logging

Describe the solution you'd like
Every message and their metadata should be logged into the database to enable data processing afterward

I don't think we should log images, but at least the number of images in a given message.

Voice Activity logging

Describe the solution you'd like
The bot should log voice activity into the database each time someone connect and disconnect from a vocal.

Linked to #4 and #3, I think the total hour and the xp generated should be registered in the user profile of someone but the rest should just be a json linked to that someone so smth like

{
    "user_id": "user_id",
    "status": {
        "channel": "vocal1",
        "connected": "DATE",
        "disconnected": "DATE"
    }
}

Once the "disconnected" field is filled, update the "voice_xp" of the given user.

I don't know if discord.py consider changing channel as a disconnection though.

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.