Skip to content
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

Plenty of new stuff #51

Open
wants to merge 818 commits into
base: master
Choose a base branch
from
Open

Plenty of new stuff #51

wants to merge 818 commits into from

Conversation

edelkas
Copy link
Contributor

@edelkas edelkas commented Dec 26, 2019

This is mainly a stylistic commit, but there's also a couple of minor functionalities added.

Main change

Added padding to name formatting and score formatting, so that most functions are aligned in columns, with two modes:

  • Fixed padding: If SCORE_PADDING is positive. The padding is determined by said constant.
  • Variable padding: If SCORE_PADDING is not positive. The necessary padding will be calculated on each request using the longest name in the board. The maximum padding is determined by MAX_PADDING, and the default padding (in case anything fails) is determined by DEFAULT_PADDING. The behaviour if some long name reaches the max padding is determined by TRUNCATE_NAME. Adjust these parameters at will.

Smaller changes

Style

  • Fixed markdown style for 'spread' function.
  • Additional alignment and padding for other functions ('suggestions', 'cleanliness', etc).
  • 4 digits in 'stats' function instead of 3 for proper alignment of columns.
  • Deleted "th" from average rank rankings.

inne++ functions

  • Prevent 'help' from spamming (on channels, only a presentation is shown, on DMs the full help is printed).
  • Improved maxable function to exclude maxes the player already has.
  • Added 'average rank for ' method.
  • Added reminder of eotw when new lotd is posted, except when new eotw is posted.
  • Added the cleanliness of the episode when asking for episode scores.
  • Simplified command for "next lotd/eotw".

Dev

  • Fixed 'missing' and 'worst' functions when there're no tabs provided (it used to return an empty list).
  • Abstracted the number 20 into NUM_ENTRIES for rankings and other methods.
  • Added a MAX_ENTRIES constant for lists in which the user inputs the number of results, to avoid spam.

@edelkas edelkas changed the title Style (alignment, padding), plus minor functionalities. Plenty of new stuff Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant