aboutsummaryrefslogtreecommitdiffstats
path: root/bot/seasons/christmas/adventofcode.py (follow)
Commit message (Collapse)AuthorAgeLines
* Deseasonify: rename `seasons` pkg to `exts`Gravatar kwzrd2020-03-28-744/+0
| | | | | | | | | It is believed that this is now a more logical name for the package, as extensions no longer bind to seasons. Internally, packages are still grouped into seasonal sub-packages. There are quite a few, and it makes sense to group them by a common theme that inspired their functionality.
* Deseasonify: move decorators module under utilsGravatar kwzrd2020-03-28-1/+1
|
* Deseasonify: season-lock commands where appropriateGravatar kwzrd2020-03-26-4/+6
| | | | | | | | | | | | | | | | I left as many available as possible. Some of the commands also handle being outside of their original season, e.g. by showing the amount of time until Hacktoberfest begins, if not currently active. These were left available as well. If a group is to be locked, the `invoke_without_command` param must be False (default), otherwise the group's callback will be circumvented if a valid subcommand is invoked. I adjusted these where necessary, except for the `HacktoberStats` cog, whose cmd group takes an arg, which would require a more involved adjustment - I decided to leave it as is, and instead manually lock both subcommands.
* Add more pre-commit hooksGravatar MarkKoz2020-03-04-1/+1
| | | | | | | | | | | | | | | | | | | | | | Hooks added: * check-merge-conflict - checks for files with merge conflict strings * check-toml - attempts to load all toml files to verify syntax * check-yaml - attempts to load all yaml files to verify syntax * end-of-file-fixer - ensures files end in a newline and only a newline * mixed-line-ending - replaces mixed line endings with LF * trailing-whitespace - trims trailing whitespace * python-check-blanket-noqa - enforces that noqa annotations always occur with specific codes Changes made to comply with new hooks: * Remove trailing whitespaces * Convert some CRLF files to LF * Remove noqa and add missing type annotations * Add missing newlines at end of files See: python-discord/organisation#138
* Unlock AoC role to make announcements actually ping the usersGravatar Sebastiaan Zeeff2019-12-04-7/+34
| | | | | | | | | | | | | | | | | | | | | The Advent of Code cog has a subscription system that allows members to subscribe to a daily notification indicating the puzzle for that day has become available. However, we introduces a more stringent role mentionability policy that meant that the mentions did not actually ping the members subscribed. To solve this, I've made sure that the bot unlocks the role before making the announcement using the `unlock_role` context manager. This also means the role is automatically unlocked after the message is sent. In addition, I noticed that Seasonalbot was consistently announcing the puzzle about 0.5 seconds early. I've correct this by adding a second to the sleep delay. In addition, the bot now verifies that the puzzle is available using a small HEAD request. While this does send a request to the AoC server, it prevents multiple users from sending unnecessary requests by following our link before the puzzle is actually available.
* Fix AOC countdown logic (#317)Gravatar S. Co12019-12-02-3/+14
|\ | | | | Fix AOC countdown logic
| * Fix AOC countdown logicGravatar S. Co12019-11-30-3/+14
| | | | | | | | | | The current time delta until the next AOC event assumes that the next event is next year's. While this is was a safe assumption when written, since the command would not be available until the season is loaded on December 1st, it provides an incorrect answer if the season is loaded prior. The logic has been adjusted to return the closest December 1st that is not in the past. The feedback string has also been adjusted to give hours remaining if we're less than a day away from the event starting.
* | Add envelope reaction if AoC join DM sends successfullyGravatar kwzrd2019-12-02-0/+2
| |
* | Delete whitespacesGravatar Matteo Bertucci2019-12-02-1/+1
| |
* | Cancel season related tasks on cog unloadGravatar Matteo Bertucci2019-12-02-0/+5
| |
* | fix line length in command `.aoc join`Gravatar decorator-factory2019-12-01-1/+1
| |
* | Fix cmd annotationGravatar decorator-factory2019-12-01-1/+1
|/ | | Fix the `brief` argument for `.aoc join` to make its behaviour more obvious.
* allow all AoC commands in whitelisted channelsGravatar Numerlor2019-10-12-0/+8
|
* limit Advent Of Code commands to global whitelist and the AoC channelGravatar Numerlor2019-10-03-2/+4
|
* call the rewritten override_in_channelGravatar Numerlor2019-10-02-1/+1
|
* Merge branch 'master' into flake8-annotationsGravatar S. Co12019-09-11-1/+1
|\
| * Fix misconfigured flake8 so docstrings are properly lintedGravatar S. Co12019-09-05-1/+1
| | | | | | Relint
* | Initial linting passGravatar S. Co12019-09-09-13/+13
|/ | | | Bot root, seasons cog, easter cogs, evergreen cogs, halloween cogs
* Implement error handling; add `in_channel` overrides to `!issue` and AoC ↵Gravatar kosayoda2019-08-06-0/+2
| | | | commands
* Merge branch 'master' into docstring-lint-changeGravatar sco12019-05-28-3/+3
|\
| * Merge branch 'master' into pypi-dpyGravatar sco12019-05-11-2/+2
| |\
| | * Constants cleaningGravatar Suhail2019-04-23-2/+2
| | |
| * | Fix broken help getter patternsGravatar sco12019-05-11-1/+1
| |/ | | | | | | | | | | Utilize new ctx.send_help coro Bump d.py minor version & relock
* / Relint Seasonalbot with new linting rulesGravatar sco12019-04-24-35/+3
|/
* Re-add cog inheritance removed by poor merge conflict resolutionGravatar sco12019-03-30-1/+1
|
* Merge branch 'master' into flake8-docstringGravatar sco12019-03-26-1/+1
|\ | | | | | | Resolve merge conflicts
| * Adjust cog load logs to use cog class name.Gravatar scragly2019-03-26-1/+1
| |
| * Set cog load log messages to infoGravatar sco12019-03-05-1/+1
| | | | | | Per the contributor doc
| * Merge branch 'master' into dpy-cog-changesGravatar sco12019-03-05-2/+9
| |\
| * | Add new Cog class inheritance & event listener decorationGravatar sco12019-03-03-1/+1
| | | | | | | | | Mitigates recent breaking d.py changes
* | | Docstring pass for Christmas cogsGravatar sco12019-03-19-67/+51
| |/ |/|
* | Merge pull request #91 from python-discord/join-code-dmGravatar Leon Sandøy2019-03-05-2/+9
|\ \ | |/ |/| AoC Join Code Refactor
| * Review-directed reformattingGravatar sco12019-01-05-3/+1
| |
| * Remove unused importsGravatar sco12018-12-26-2/+1
| |
| * Remove local env var modification commandGravatar sco12018-12-26-16/+1
| |
| * Remove extraneous whitespaceGravatar sco12018-12-10-1/+1
| |
| * Add staff command to change AoC leaderboard join codeGravatar sco12018-12-10-1/+16
| |
| * Refactor aoc join to DM user with join codeGravatar sco12018-12-10-3/+13
| |
* | Fixing error in advent of code countdown by removing datetime prefixesGravatar Joseph Banks2018-12-26-2/+2
| |
* | Address flake8 complaintsGravatar Joseph Banks2018-12-26-1/+2
| |
* | Fix the grammar on the messageGravatar Joseph Banks2018-12-26-1/+1
| |
* | Address review commentsGravatar Joseph Banks2018-12-26-1/+4
| |
* | Add a notice to AoC countdown to find out if we are still in the advent of codeGravatar Joseph Banks2018-12-26-0/+4
| |
* | Fix is_in_advent() functionGravatar Joseph Banks2018-12-26-1/+2
|/
* Delete parenthesesGravatar sco12018-12-05-1/+1
|
* Fix leaderboard parsing regex to support twitter handlesGravatar sco12018-12-05-1/+1
|
* Add daily summary commandGravatar sco12018-12-05-6/+37
|
* Add daily summary statistics calculationGravatar sco12018-12-05-2/+40
| | | | Frame stats command Remove "stats" adjacent aliases for existing commands to avoid confusion
* Merge pull request #80 from scragly/season_improvementsGravatar Johannes Christ2018-12-04-1/+4
|\ | | | | Season Improvements
| * Add season announcement supportGravatar scragly2018-12-03-1/+4
| |