mieuxvoter / majority-judgment-bot-nimda-discord Goto Github PK
View Code? Open in Web Editor NEWDiscord bot to create polls using majority judgment.
License: GNU Lesser General Public License v3.0
Discord bot to create polls using majority judgment.
License: GNU Lesser General Public License v3.0
Right now the bot will happily serve anyone.
This task is open and consists of two parts:
A bot needs a proper logging system.
We could also add a command hash for each command, to help peruse logs.
We'll ensure the docker image configures logrotate, and perhaps we'll switch to Monolog.
We can probably go with FROM php:7.4-fpm-alpine
and some docker-ext-install
.
If anyone wants to take on the Dockerfile
, or you have requirements, suggestions⦠please share !
That would be nice. It would enable private ballots and rapid curation (making sure there's no duplicates, see #5 ).
The Button feature is pretty recent, and I've not yet found it in third party libs.
Would require updating the discord driver ourselves or changing it altogether.
Or waiting a bitβ¦
If anyone has more info about this, or want to take this on, go for it!
We should expose a !help
command as well.
Right now the tally collector is naive and does not check duplicate participation, which can happen even with our toggle enforcer. (the bot may have been offline while reactions were added).
The !result
command will need many (paginated) requests to Discord in order to get all the participants to each of the reactions (grades) of each of the proposals. As you may guess, this scales horribly.
In the end we may need two commands (or options), one for the "fast" result that may be a little wrong (what we have now), and one for the "curated" result that will be correct but may take a long time to collect.
Note that using Discord's Buttons instead of Discord's Reactions will probably make this issue moot. This is why we have not spent too much time on this. Our stack does not readily support Buttons at the moment, but Buttons are a very recent addition.
This bot is libre, so anyone may make their own, provided they jump through Discord's hoops to create a bot on their platform, and they manage to install and run this codebase.
The bot is not very resilient, in its current state.
Even without abuse intents, there will be crashes and failures to address.
So the bots needs to be used and prodded by trusted and forewarned users for a little while,
It's hard to guess for how long, or how many uses.
I suggest the following plan :
The bot URL to install it is given by members of MieuxVoter to select collaborators, with their word not to share it.
The bot URL is available, and channel restrictions are in-place to avoid flooding and crashing the bot for everyone.
We're confident the bot can sustain the load, and release it on Twitter or something.
The !result
command will need many requests to Discord in order to get all the participants to each of the reactions (grades) of each of the proposals. As you may guess, this scales horribly.
A poll with thousands of participants may take many minutes to collect.
Right now the tally collector is naive and does not check duplicate participation, which can happen even with our toggle enforcer. (the bot may have been offline while reactions were added)
But it is also fast, and it scales much better.
In any case, expensive commands such as !result
should be constrained by a cooldown, since it is a building brick for better tally curation.
That would be nice.
!config set grades π π π π π
!config set defaultGrade [0-N]|worst|best|median|normalized
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.