djmcgill / dominions-5-status Goto Github PK
View Code? Open in Web Editor NEWA discord bot to provide utilities for players of Dominions 5. Notify on turns, show status, track players, form lobbies.
License: MIT License
A discord bot to provide utilities for players of Dominions 5. Notify on turns, show status, track players, form lobbies.
License: MIT License
Right now anybody can delete/mess with anything
!remindme <game> <number of turns> <message>
e.g. !remindme testgame 12 NAP with ermor expires
: bot PMs you "NAP with ermor expires" after 12 turns have passed in testgame
!remindme 2 build fort in 98
: bot PMs you "build fort in 98" after 2 turns have passed for the game named after the channel the reminder was created in
maybe also !reminder
for channels
e.g. !reminder 6 peoples arena
: bot messages the current channel "peoples arena" after 6 turns have passed for the game the reminder was created for
huh turns out even when somebody hasn't uploaded, snek's games api still shows all available upload nations and we could use that
As if that person has done !unregister
Hi, I recently tried to compile this on several platforms (Ubuntu 18.04 WSL, Ubuntu 20.04 VM, Alpine 3.12) and had a lot of trouble compiling the code because several dependencies rely on OpenSSL v0.9.X. I followed the typical advice of installing libssl-dev
and pkg-config
but that didn't seem to make the problem go away.
I was able to successfully build the docker image at least. I was not able to pull the image due to permission issues so I had to build it.
Out of curiosity I attempted to update enough dependencies to stop having compilation issues with outdated OpenSSL dependencies. It eventually worked but some breaking API changes were made along the way (since the dependencies compiled, but then the main crate code stopped compiling).
It would be nice if the project were updated to make things less difficult on newer systems. This would not necessarily be trivial (again due to the necessity of rewriting and testing the code) but would be much appreciated.
I may take a shot at it myself. Let me know if you have any advice or any reasons why maybe this isn't worth pursuing (for all I know I may have just had something silly misconfigured).
this would be useful for: 1) mod nations not hosted on snek, or 2) when vanilla ids are overwritten for whatever reason (e.g. yomi in hellenika)
The idea being that you are registering as if you'd used register-id, but it ignores whatever it thinks the nation name "should" be, including "unknown", and uses whatever you give it instead.
Shouldn't be too bad from a technical perspective, since the db already has separate id and name columns, and there'd be a new case for the enum (BotNationIdentifier
) that pulls from that table, one where both are filled as an override.
The panic is a negative underflow slice error, i.e.
thread 'serenity client' panicked at 'index out of bounds: the len is 0 but the index is 18446744073709551615'
and this is presumably because a list of players or player nations is getting indexed but because the person is a nation name not an ID, the list is one shorter than the code expects.
When all players are defeated this turn except 1, the game is over. Maybe give it 24 hours then be deleted.
When game server crashes, usually with an invalid map, it captures http connections. There is a timeout mechanism but clearly it doesn't work fully.
On the whole they mostly work except the describe command says to use quotes when actually you should not use quotes so gotta add a param to it saying if it was invoked by slash or bang
e.g. registering as "MA man"
I got to this part of the instructions:
Run the command: docker run -it -d --restart unless-stopped -v /home/dmcgill9071/dom-5-bot/resources:/usr/src/myapp/resources --log-opt max-size=10m --log-opt max-file=5 eu.gcr.io/dom-5-status/dom-5-status except replace /home/dmcgill9071/dom-5-bot/resources with the location of your resource folder.
No idea what any of that is and of course docker is a Mac thing.
I don't know anything about bots. Installed rust for the first time. I'm stuck.
the main issue is that it won't be able to detect your upload but whatever
I don't know why it happens. Might be related to game reminders if I add a db flag for remembering when I've sent messages.
Serenity examples: https://github.com/serenity-rs/serenity/blob/current/examples/e14_slash_commands/src/main.rs
Discord API docs: https://discord.com/developers/docs/interactions/slash-commands
Okay so on first glance these seem great, remembering which arguments in which order are used for which commands is a significant barrier to entry for new users and still a burden for experienced ones.
Having said that, it seems a totally different execution model so possibly another big refactor immediately after starting the last? Also it seems like you no longer have a choice of prefix and it's always forward-slash?
It's not like people are actually going to make a "DMs with XXX" game and it makes typos less frustrating
It's so bad right now
The bot was offline when the turn ran. Need to manually send out that notification. Or make the bot recognize if the current turn number does not match with the bot's last notification.
Edit: I mean I just want to send out the notification where it says how much time is left. Nothing new.
Why was the decision made to make notifications false by default? I want this to be a simple as possible for non-techies to use. Having to explain "hey you need to put in these two commands separately, don't copy and paste both at once" is annoying.
The help text needs to specify if it's true or false by default.
Another solution would be to provide a single line command to register and set notifications true in one line.
Create (and delete) channels for new lobbies/games.
When a turn changes, either edit a pinned message, or just output into channel
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.