aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| * | | | | | | | | | | | | | | | Merge pull request #1465 from python-discord/gitattributesGravatar Dennis Pham2021-03-14-2/+1
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use .gitattributes to normalise line endings on check-in
| | * | | | | | | | | | | | | | | | Use .gitattributes to normalise line endings on check-inGravatar MarkKoz2021-03-13-2/+1
| |/ / / / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the mixed line endings pre-commit hook because it is obsolete. Relying on git to handle line endings means contributors have more flexibility with which line endings they want to use on check-out. The settings in .gitattributes only impose which line endings will be used upon check-in (LF), which should not impact local development; git will still respect the core.eol and core.autocrlf settings.
| * | | | | / / / / / / / / / / / master => mainGravatar Joe Banks2021-03-13-22/+22
| | |_|_|_|/ / / / / / / / / / / | |/| | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | Update help channel names from chemical elements to fruitGravatar Joe Banks2021-03-13-126/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update and rename elements.json to fruits.json * Update _name.py * Update _cog.py
| * | | | | | | | | | | | | | | Merge pull request #1461 from python-discord/simplify-pypiGravatar ks1292021-03-13-21/+12
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplifying the PyPi command.
| | * | | | | | | | | | | | | | | Added '_' to allowed chars, shortened embed.Gravatar xithrius2021-03-12-21/+12
| |/ / / / / / / / / / / / / / /
| * | | | | | | | | | | | | | | Merge pull request #1455 from python-discord/many-snowflakesGravatar Matteo Bertucci2021-03-12-11/+16
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow the sf command to take more than one snowflake at the time
| | * \ \ \ \ \ \ \ \ \ \ \ \ \ \ Merge branch 'master' into many-snowflakesGravatar Xithrius2021-03-12-262/+248
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / / / / / / | |/| | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | Fix typo in the token removerGravatar Matteo Bertucci2021-03-12-1/+1
| | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | Merge pull request #1452 from python-discord/pypi-delete-on-not-foundGravatar Matteo Bertucci2021-03-12-27/+35
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove invoked command and message after failure.
| | * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Merge branch 'master' into pypi-delete-on-not-foundGravatar Matteo Bertucci2021-03-12-3/+2
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / / / / / / / | |/| | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | Merge PR #1460 - compose: read all env vars from '.env'Gravatar Mark2021-03-11-3/+2
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|/ / / / / / / / / / / / | |/| | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | Compose: read all environment variables from '.env'Gravatar kwzrd2021-03-12-4/+2
| | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | Compose: read GitHub API key from '.env'Gravatar kwzrd2021-03-11-0/+1
| | | |_|_|/ / / / / / / / / / / / | | |/| | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | | Remove invoked command and message after failure.Gravatar xithrius2021-03-11-27/+35
| | |/ / / / / / / / / / / / / / | |/| | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | Restrict non-staffer to one snowflake at the timeGravatar Matteo Bertucci2021-03-08-1/+5
| | | | | | | | | | | | | | | |
| | | * | | | | | | | | | | | | Make the snowflake command accept many snowflakesGravatar Matteo Bertucci2021-03-08-12/+13
| | | | |_|_|_|/ / / / / / / / | | | |/| | | | | | | | | | |
| | | | | * | | | | | | | | | Branding: add contextual message to #changelog notificationsGravatar kwzrd2021-03-28-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It would be strange to just send the embed with no explanation of what it means.
| | | | | * | | | | | | | | | Branding: omit notification when entering evergreenGravatar kwzrd2021-03-27-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fallback event should not produce a notification.
| | | | | * | | | | | | | | | Branding: revise log messages & levelsGravatar kwzrd2021-03-27-49/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Logs are now proper sentences ended with full stops. Exceptions are logged with full tracebacks, and log level are revised to be more sensible and consistent across the extension.
| | | | | * | | | | | | | | | Branding: revise documentationGravatar kwzrd2021-03-27-97/+80
| | | | | | | | | | | | | | |
| | | | | * | | | | | | | | | Branding: ensure daemon logs exceptionsGravatar kwzrd2021-03-27-5/+8
| | | | | | | | | | | | | | |
| | | | | * | | | | | | | | | Branding: make 'meta.md' parser synchronousGravatar kwzrd2021-03-26-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No reason for this to be async.
| | | | | * | | | | | | | | | Branding: raise custom error when constructing remote objectsGravatar kwzrd2021-03-26-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default KeyError message from dict lookup is just the missing key. In order to give more context in the log message, we raise our own.
| | | | | * | | | | | | | | | Branding: raise on non-200 responsesGravatar kwzrd2021-03-26-23/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fetch helpers will now raise when the request fails rather than logging a warning and returning a fallback value. This allows better error logging as the caller is able to log the propagated exception while adding its own context. Additionally, the caller in some cases no longer needs to check for the None return and raise its own exception.
| | | | | * | | | | | | | | | Branding: cache fresh event description in daemonGravatar kwzrd2021-03-25-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the event description & duration strings were only stored on event entry. In the case that the description or duration change for an on-going event, the cached values wouldn't be updated. After this commit, the cache is refreshed daily by the daemon.
| | | | | * | | | | | | | | | Branding: improve 'compound_hash' docstringGravatar kwzrd2021-03-25-1/+5
| | | | | | | | | | | | | | |
| | | | | * | | | | | | | | | Branding: update 'synchronise' docsGravatar kwzrd2021-03-18-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After previous changes, the docstring was no longer accurate. See: 1d5625a2f47a1d4d050f9eb0eb7a18e7d6fe171b
| | | | | * | | | | | | | | | Branding: extend command aliasesGravatar kwzrd2021-03-17-2/+2
| | | | | | | | | | | | | | |
| | | | | * | | | | | | | | | Branding: adjust daemon start-up behaviourGravatar kwzrd2021-03-17-35/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The daemon will now perform a sync iteration immediately when started, and then every UTC midnight. Previously, it would only perform the initial iteration when started for the first time, which is odd. It is also believed that splitting the daemon's logic into three separate functions is beneficial: before, loop, and main. This commit makes log and doc adjustments where appropriate.
| | | | | * | | | | | | | | | Pipenv: bump 'python-frontmatter' pin & re-lockGravatar kwzrd2021-03-15-19/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fresh stable release, just in time!
| | | | | * | | | | | | | | | Branding: decode 'meta.md' using UTF-8Gravatar kwzrd2021-03-15-1/+1
| | | | | | | | | | | | | | |
| | | | | * | | | | | | | | | Branding: suppress 'ValueError' on empty-dict updateGravatar kwzrd2021-03-14-4/+6
| | | | | | | | | | | | | | |
| | | | | * | | | | | | | | | Branding: check for empty icon cacheGravatar kwzrd2021-03-14-0/+4
| | | | | | | | | | | | | | |
| | | | | * | | | | | | | | | Branding: add embed length cut-offs for safetyGravatar kwzrd2021-03-14-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should never do anything, but it's better to be safe. Values taken from Discord developer docs.
| | | | | * | | | | | | | | | Branding: provide class documentationGravatar kwzrd2021-03-14-2/+43
| | | | | | | | | | | | | | |
| | | | | * | | | | | | | | | Branding: log correct amount of cached eventsGravatar kwzrd2021-03-14-1/+3
| | | | | | | | | | | | | | |
| | | | | * | | | | | | | | | Branding: log event path alongside errorGravatar kwzrd2021-03-14-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Knowing which event failed would probably be quite useful.
| | | | | * | | | | | | | | | Branding: avoid sending #changelog notification on resyncGravatar kwzrd2021-03-14-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The notification is now sent conditionally depending on whether we're entering a new event. This prevents sending a repeating notification in the case of a manual resynchronisation. A practical example of when this may trigger is when a staff member temporarily applies custom assets & then uses the sync command to reapply the current event.
| | | | | * | | | | | | | | | Branding: make 'cog_unload' synchronousGravatar kwzrd2021-03-14-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Discord.py doesn't await the return value.
| | | | | * | | | | | | | | | Branding: show success information in 'sync' responseGravatar kwzrd2021-03-14-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the boolean flags are propagating from 'apply_asset', we can present them to the user.
| | | | | * | | | | | | | | | Branding: propagate success-indicating boolean from 'apply_asset'Gravatar kwzrd2021-03-14-19/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sync command will now be able to use present this information to the invoking user. This commit also prevents the cached banner & icon hash from being overwritten in the case of asset upload failure. As a result, the daemon will attempt to re-apply the assets the following day.
| | | | | * | | | | | | | | | Branding: do not call 'rotate_icons' from rotation initGravatar kwzrd2021-03-14-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It makes more sense for the init and the rotation to be separate operations. In a subsequent commit, the separation of responsibility will allow the `rotate_icons` function to have a meaningful return value.
| | | | | * | | | | | | | | | Branding: replace ugly lambda with 'attrgetter'Gravatar kwzrd2021-03-13-1/+2
| | | | | | | | | | | | | | |
| | | | | * | | | | | | | | | Branding: add calendar command groupGravatar kwzrd2021-03-13-0/+63
| | | | | | | | | | | | | | |
| | | | | * | | | | | | | | | Branding: cache all available eventsGravatar kwzrd2021-03-13-11/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a prequel to adding a calendar command. To avoid re-querying the branding repo on command invocation, event information will be cached whenever we make requests. The command can then simply get an up-to-date event schedule from the cache, with the option of forcing an update via the 'populate_cache_events' function. Since we cannot easily serialize entire 'Event' instances, we simply store what's needed - the event name, and its duration. The author has verified that the cache maintains order; in this case chronological order based on event start date.
| | | | | * | | | | | | | | | Branding: extract duration string in helper functionGravatar kwzrd2021-03-13-9/+17
| | | | | | | | | | | | | | |
| | | | | * | | | | | | | | | Branding: add missing early exitGravatar kwzrd2021-03-13-0/+1
| | | | | | | | | | | | | | |
| | | | | * | | | | | | | | | Branding: lock commands to mods+ where necessaryGravatar kwzrd2021-03-13-1/+3
| | | | | | | | | | | | | | |
| | | | | * | | | | | | | | | Branding: implement command interfaceGravatar kwzrd2021-03-13-1/+85
| | | | | | | | | | | | | | |