Skip to content

Conversation

@SirMorfield
Copy link
Contributor

@SirMorfield SirMorfield commented Jan 26, 2023

I refactored and simplified some parts of the bot, mainly in regards to the database wrapper to avoid more bloat. #Joptimized

Also I need to learn how to make PR's since I am a junior dev.

@SirMorfield SirMorfield marked this pull request as ready for review February 10, 2023 10:48
@SirMorfield SirMorfield requested a review from W2Wizard February 10, 2023 10:50
Copy link
Contributor

@W2Wizard W2Wizard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I did this now after months right during my internship.
Only ask you to actually triple check if this works.

Comment on lines +52 to +55

export function random() {
return Math.random() < Config.randomEvalChance / 100;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why ? The whole idea is to separate all potential checks into their own files to avoid cluttering them into a giant file like this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also please start using docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add comments
And I moved it to a single file because they're all part of the same Checks namespace
Otherwise you have 2 files with < 5 LOC in it
Now we have one file with 55 lines
Much cleaner

@W2Wizard W2Wizard added the enhancement New feature or request label May 30, 2023
@W2Wizard W2Wizard changed the title Don't repeat yourself! Refactor code and cleanup May 30, 2023
@SirMorfield
Copy link
Contributor Author

Stop changing my messages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants