rdan (Robot, Delightfully Assisting Nomic) is a small bot to help run a game of Nomic.
samcoy3 / rdan Goto Github PK
View Code? Open in Web Editor NEWA Discord bot to help with games of Nomic. Written in Haskell.
A Discord bot to help with games of Nomic. Written in Haskell.
It would be nice to have some way to serialise the state of the game. Currently if the bot crashes this needs to be reconstructed.
Doesn't need to be fancy, just needs to serialise the current vote and the current scores, ideally after every interaction. It can then read this from disk on startup, if the file exists.
The ability to type, for example, !r20
or !m20
inline would be convenient for referring to rules.
It would also be great if it could pull out and print more than one at once, for example
I think !r10 conflicts with !r11 here.
would print both the text of rule 10 and rule 11.
rdan's config should be serialised in a YAML file and read on startup. This should contain the player names and IDs, the motion and rules channels, and the API token.
Rdan should support multiple votes occurring simultaneously.
Votes will need to be recorded by reactions rather than by response messages in order to facilitate this.
rdan should allow users to set timers for events. For example, !timer 1h Make macaroni cheese
will echo a message into the channel in which the message was sent, in one hour, saying "Make macaroni cheese". This could be used to remind players of the end of a nomination period, for example.
It would be great if the bot could interpret commands of the form !roll XdY
.
The randomRIO
function, and some simple parsing (or regular expressions) should be sufficient.
rdan should post and amend rules.
Using a command like !post 23
to transfer motion 23 to the rules channel, and !amend 23 <newtext>
to amend rule 23 to the new text should be sufficient. A !repeal
command might also be desirable, but messages can just be deleted.
It would be nice if rdan could track who proposed a motion, such that only the author may amend a motion.
This would also make it unlikely for someone to overwrite some other motion by accident.
Desirable extra features:
!motion claim number
to add yourself as an owner of a motionIt may be convenient to have a special sentinel value all
which can be passed in the following way
!endVote all
to end all ongoing votes.
If a vote will complete soon (say, within 10 minutes), it would be convenient if rdan sent a PM to any players who had not yet voted on the motion to say that, if they are eligible, they should vote.
Rdan should support multiple votes occurring simultaneously.
Votes will need to be recorded by reactions rather than by response messages in order to facilitate this.
If votes may be timed, the ability to pause and resume ongoing vote timers may become useful.
The expected syntax would be
!pauseVote v15
to pause a particular vote, and
!resumeVote v15
to resume it.
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.