diff options
author | 2019-03-05 18:05:45 +0100 | |
---|---|---|
committer | 2019-03-05 18:05:45 +0100 | |
commit | 61346933195f96a5e13ef147fb85f8fa4a1182ef (patch) | |
tree | 30e374eec811f722026770fa0789133ab95cd06a /bot/seasons/christmas/adventofcode.py | |
parent | Update myvalenstate.py to address requested changes (diff) |
Fix myvalenstate
A bug appeared, that, if a user were to have only one or two Valenstates,
would throw an IndexError, thus blocking the command to run at its fullest.
This commit aims at fixing this bug by refining how the leftovers are handled:
Before there was only one line determining the leftover string, that was
than put into the embed's add_field method with some extra stuff around
it and a fixed title.
This has now been changed to having a variable title changing with the
length of the matches list. For example if you have 3 original matches,
the matches list would be of length 2, thus the original title is displayed.
If you have only 2 or just 1 match however, the matches list would be of
length 1 or 0, each of which feature their own title and text now.
Some style changes have been made as well: the add_field and set_image
methods are now one liners.
Diffstat (limited to 'bot/seasons/christmas/adventofcode.py')
0 files changed, 0 insertions, 0 deletions