2kai2kai2 / eu4img Goto Github PK
View Code? Open in Web Editor NEWA Discord bot for the video game EU4 that creates in-channel post-game reports, organizes game reservations, etc.
License: GNU General Public License v3.0
A Discord bot for the video game EU4 that creates in-channel post-game reports, organizes game reservations, etc.
License: GNU General Public License v3.0
Need to reduce processing on each line to increase speed. The file is very large, meaning small differences per line can have a major effect.
-Centered
-EU4 in-game format: dd month yyyy
/help should replace HELP in controlled channels. The context should be determined and the appropriate help message for the channel should be displayed.
Save data needs to be loaded on startup.
On_ready, copy all the still valid reserve channels into interactions
Could be either:
a. Settings file
b. Enter order in program (would need to be implemented without being too much work for users)
Unlike with reserves, this will not revolve around objects. Each function will simply have a parameter to specify guild. However, similarly to reserves, data will be stored on the database unless some local caching is implemented.
Potential items:
Controlled channels own a Reserve (or ASIReserve) object that is essentially a wrapper for a bunch of database calls, only keeping the channel ID that identifies all relevant data.
On MongoDB, all the data for reservations is stored in the conveniently-named "reservations" database. It has one collection called "index" that contains a document for each Reserve or ASI Reserve channel with data for each. There is then another collection for each of these, with a name consisting of a string of its channel ID (all digits) that contains a document for each player that has a reservation. Both the index and pick collection are identified by channel ID.
We could implement some sort of local caching of data eventually.
2019-12-16T03:32:59.893019+00:00 app[worker.1]: Ignoring exception in on_message
2019-12-16T03:33:00.002903+00:00 app[worker.1]: Traceback (most recent call last):
2019-12-16T03:33:00.005012+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/discord/client.py", line 270, in _run_event
2019-12-16T03:33:00.005016+00:00 app[worker.1]: await coro(*args, **kwargs)
2019-12-16T03:33:00.005023+00:00 app[worker.1]: File "EU4Bot.py", line 944, in on_message
2019-12-16T03:33:00.005025+00:00 app[worker.1]: elif (text.upper() == prefix + "NEW") and checkResAdmin(message.guild, message.author):
2019-12-16T03:33:00.005027+00:00 app[worker.1]: File "EU4Bot.py", line 97, in checkResAdmin
2019-12-16T03:33:00.005030+00:00 app[worker.1]: return getRoleFromStr(s, os.getenv("MIN_ADMIN")) <= u.top_role
2019-12-16T03:33:00.005098+00:00 app[worker.1]: TypeError: '<=' not supported between instances of 'NoneType' and 'Role'
-Guilds
-Reserves (different types)
-Be future-proofed to be able to save other kinds of controlled channels?
Determine how much of the data should be stored in memory/cached and for how long
Hi,
Not sure if you're still working on this project, but I was going to give it a try, but it looks like the link to ask for a bot link is broken. Intentional? If not, would love to see if I can get this to work for my savegame!
While every other item in the process of drawing the stats image takes less than a second, deciding where to draw player nation borders can take upwards of a minute. Reducing this is the primary goal for stats image optimization.
Standardize acceptable other inputs:
int
Guild/User/Member/Channel (we just get the id)
Do we accept strings that can be directly cast?
The political mapmode image is held in memory indefinitely until the user completes player list modification for the stats interaction. This could be forever if the user never completes or cancels the interaction.
Solutions:
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.