-
Notifications
You must be signed in to change notification settings - Fork 0
New Features, Optimizations, and Code Style Improvements #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Added a temporary notice
I've added a fix for the graph height issue for issue #12 Changed how Trend data is calculated, the trend data will now include the first days worth of data
I am working on optimizing the bot so that it will run smoother and faster I've also changed a bunch of variable names, and set up ESLint to help with consistency and find errors quicker Please note, this will only process the servers.json file once and will just halt, as I havent set up the loop yet!
Ive added looping functionality to the bot, also I've fixed an issue where the guild wasnt being initialized if the bot was added when the bot was running
}); | ||
}); | ||
|
||
fs.readFile('./public/server_info.json', 'utf8', (err, data) => { | ||
if (err) throw err; |
Check failure
Code scanning / CodeQL
Server crash
serverInfo[guild_id] = {}; | ||
} | ||
if (!serverInfo[guild_id][server_uuid]) { | ||
serverInfo[guild_id][server_uuid] = { |
Check warning
Code scanning / CodeQL
Prototype-polluting assignment
if (!(server_uuid in jsonData[guild_id])) { | ||
jsonData[guild_id][server_uuid] = { | ||
if (!(serverUUID in jsonData[guildID])) { | ||
jsonData[guildID][serverUUID] = { |
Check warning
Code scanning / CodeQL
Prototype-polluting assignment
jsonData[guild_id][server_uuid].status = server_info.status; | ||
jsonData[guild_id][server_uuid].last_restart = server_info.last_restart; | ||
jsonData[guild_id][server_uuid].message_id = server_info.message_id; | ||
jsonData[guildID][serverUUID].map = queryState.map; |
Check warning
Code scanning / CodeQL
Prototype-polluting assignment
jsonData[guildID][serverUUID].map = queryState.map; | ||
jsonData[guildID][serverUUID].players.push(queryState.active_players); | ||
jsonData[guildID][serverUUID].ping.push(queryState.ping); | ||
jsonData[guildID][serverUUID].status = queryState.status; |
Check warning
Code scanning / CodeQL
Prototype-polluting assignment
jsonData[guildID][serverUUID].players.push(queryState.active_players); | ||
jsonData[guildID][serverUUID].ping.push(queryState.ping); | ||
jsonData[guildID][serverUUID].status = queryState.status; | ||
jsonData[guildID][serverUUID].last_restart = queryState.last_restart; |
Check warning
Code scanning / CodeQL
Prototype-polluting assignment
This pull request introduces numerous features and bug fixes, including optimizations to improve the bot's reliability when querying multiple servers. Additionally, we've made coding style enhancements and important updates to the Backend API.
List of Changes