aboutsummaryrefslogtreecommitdiffstats
path: root/bot/bot.py (unfollow)
Commit message (Collapse)AuthorLines
2020-04-06(Space): Added check is date in range 16th June 1995 and today.Gravatar ks129-1/+6
2020-04-06(Minesweeper): Added try-except block to reveal command.Gravatar ks129-1/+5
2020-04-04Try to fetch devlog channel if not found in cacheGravatar kwzrd-2/+6
2020-04-03Remove redundant task assignmentGravatar kwzrd-1/+1
2020-04-03Send greeting message to devlog channel on bot start-upGravatar kwzrd-0/+1
Previously, this was done by the SeasonManager cog, which was removed during our deseasonification efforts.
2020-04-03Ensure cache is ready before grabbing devlog channelGravatar kwzrd-0/+1
2020-04-01Docstring: remove dots from list entriesGravatar kwzrd-8/+8
2020-04-01Deseasonify: remove redundant log level setterGravatar kwzrd-1/+0
2020-04-01Deseasonify: implement __str__ for Month enumGravatar kwzrd-15/+21
This way, we can standardize the way Months are shown to both the user and the developer. Note that if passing a Month member to an f-string, the `!s` format code must be specified to ensure our __str__ is used. Co-authored-by: MarkKoz <[email protected]>
2020-03-31Deseasonify: yield ints representing days since cycleGravatar kwzrd-15/+14
Previously, the `should_cycle` iterator would signal that it is time to cycle by yielding True. As per Mark's suggestion, this is adjusted to yield either None, or ints representing days since last cycle. This is more transparent, as the daemon can now perform the comparison against the configured cycle frequency itself, rather than relying on being fed the correct value from a "black box". See `_reset_should_cycle` docstring for further clarification. Co-authored-by: MarkKoz <[email protected]>
2020-03-31Deseasonify: validate season setupGravatar kwzrd-3/+22
Add a static check confirming that no seasons overlap. This avoids having to deal with ambiguities in `get_current_season` at runtime, as we can now rely on `len(active_seasons)` always being 0 or 1. Co-authored-by: MarkKoz <[email protected]>
2020-03-31Deseasonify: adjust 'Merrybot' to 'MerryBot'Gravatar kwzrd-1/+1
For the sake of consistency - all other seasonal bot names have the B capitalized. Co-authored-by: MarkKoz <[email protected]>
2020-03-31Deseasonify: set target branch to masterGravatar kwzrd-1/+1
With the 'seasonal-structure' branch being merged in the branding repository, we can start polling master.
2020-03-31Deseasonify: title-case month names in frontendGravatar kwzrd-2/+2
After 00af207de3087a41270f216ad86e06ba7dbf9d42, we should ensure that the month names aren't shown to the user in all caps. Co-authored-by: MarkKoz <[email protected]>
2020-03-31Deseasonify: turn helpers into regular functionsGravatar kwzrd-5/+5
It is not necessary for these to be coroutines. Co-authored-by: MarkKoz <[email protected]>
2020-03-31Deseasonify: `pop` from remaining icons rather than unpackGravatar kwzrd-1/+1
This should be more readable. Co-authored-by: MarkKoz <[email protected]>
2020-03-31Deseasonify: delegate refresh to dedicated commandGravatar kwzrd-3/+1
Reduces code duplication. Co-authored-by: MarkKoz <[email protected]>
2020-03-31Refactor: Github to GitHubGravatar kwzrd-15/+15
Co-authored-by: MarkKoz <[email protected]>
2020-03-31Refactor: adjust docstrings based on feedbackGravatar kwzrd-17/+13
* Capitalize month names * Add backticks to `sha` attr reference * Avoid misusing the term 'poll' Co-authored-by: MarkKoz <[email protected]>
2020-03-31Refactor: capitalize AssetType enum membersGravatar kwzrd-6/+6
Co-authored-by: MarkKoz <[email protected]>
2020-03-31Refactor: capitalize Month enum membersGravatar kwzrd-31/+31
Co-authored-by: MarkKoz <[email protected]>
2020-03-31(Games Cog): Updated task repeating cooldown time.Gravatar Karlis S-1/+1
Changed `hours` argument in `refresh_genres_task` from `1.0` to `24.0` due no need for so fast updating.
2020-03-31(Games Cog): Removed unnecessary check on possibilities showing.Gravatar ks123-1/+1
2020-03-31(Games Cog): Added ratio filtering to `get_best_results`, simplified ↵Gravatar ks123-15/+14
matching in `.games` command.
2020-03-31(Games Cog): Added check is there more than 1 possibility of genre matching ↵Gravatar ks123-0/+3
that have higher than 0.60 ratio.
2020-03-31(Space Cog): Removed `async` from `create_nasa_embed` function.Gravatar ks123-5/+5
2020-03-31(Space Cog): Added `get_rovers` task canceling with `cog_unload` function.Gravatar ks123-0/+4
2020-03-30Deseasonify: resolve current season w.r.t. month overrideGravatar kwzrd-2/+2
Previously, the env var was only being used for seasonal decorators, not branding. Although for testing purposes, seasons can be easily set via bot commands, it makes sense to also use the env var to choose the current season.
2020-03-30Deseasonify: move current month resolver to utilsGravatar kwzrd-18/+19
The function is useful to other modules as well - not only decorators. This declares it as public and moves it to a more accessible place.
2020-03-30Deseasonify: remove `autostart` env varGravatar kwzrd-1/+0
Constant is no longer used. See: 9259f985e6e327a522b4420c879a50cb4f75a09d
2020-03-30Deseasonify: add persistent branding configurationGravatar kwzrd-5/+31
A persistent config file will remember whether the daemon is supposed to be running, or not. This means that instead of relying on the env variable, the daemon can be turned on or off "once and for all" via a command, and will not violate this decision on restart. This effectively deprecates the `Branding.autostart` env var. It is believed that having two ways to configure the same thing would be more confusing than useful. The env var will be removed. The two helper functions for reading and writing have been implemented in a generic manner, meaning that should a new config key be added in the future, the helpers shouldn't require any further adjustments. Suggested by lemon and scragly. Co-authored-by: Leon Sandøy <[email protected]> Co-authored-by: scragly <[email protected]>