aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (unfollow)
Commit message (Collapse)AuthorLines
2021-03-27Branding: omit notification when entering evergreenGravatar kwzrd-3/+3
The fallback event should not produce a notification.
2021-03-27Branding: revise log messages & levelsGravatar kwzrd-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.
2021-03-27Branding: revise documentationGravatar kwzrd-97/+80
2021-03-27Branding: ensure daemon logs exceptionsGravatar kwzrd-5/+8
2021-03-26feat: add link to discord dev portal intents sectionGravatar vcokltfre-1/+1
2021-03-26fix: remove . from the hyperlinkGravatar vcokltfre-1/+1
Co-authored-by: Joe Banks <[email protected]>
2021-03-26Branding: make 'meta.md' parser synchronousGravatar kwzrd-2/+2
No reason for this to be async.
2021-03-26Branding: raise custom error when constructing remote objectsGravatar kwzrd-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.
2021-03-26Branding: raise on non-200 responsesGravatar kwzrd-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.
2021-03-25Branding: cache fresh event description in daemonGravatar kwzrd-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.
2021-03-25Branding: improve 'compound_hash' docstringGravatar kwzrd-1/+5
2021-03-20Added myself to CODEOWNERSGravatar wookie184-0/+1
2021-03-20Added nomination voting channel to configGravatar wookie184-2/+4
Also changed talentpool review cog to post there instead of mod-announcements
2021-03-19Fix review formatting when there's only one infraction typeGravatar Boris Muratov-5/+8
2021-03-19Review commands now use the user ID instead of nomination IDGravatar Boris Muratov-27/+19
The user ID is much more accessible, and is usually what is used to obtain the nomination ID.
2021-03-19Don't reschedule reviews that are long overdueGravatar Boris Muratov-1/+3
If it's been over a day overdue for a review, don't reschedule it. This is done in order to not fire reviews for all nominations which are over 30 days old when the auto-reviewing feature is merged.
2021-03-19Mark as reviewed when nominee is off serverGravatar Boris Muratov-3/+4
This is necessary as otherwise the bot would try to review them every time it restarts
2021-03-19Default message in review when no nomination reason givenGravatar Boris Muratov-1/+1
2021-03-19Replace mentions for ID's in watchlist listsGravatar Boris Muratov-1/+1
Uncached mentions render as 'invalid' users on mobile, and with the list now showing the user's name we can now just show the ID without many problems.
2021-03-19Properly await coroutine in post_reviewGravatar Boris Muratov-1/+3
2021-03-19Use ctx.send instead of ctx.channel.sendGravatar Boris Muratov-1/+1
Co-authored-by: ToxicKidz <[email protected]>
2021-03-19Add additional logging to _review.pyGravatar Boris Muratov-0/+8
2021-03-19Apply requested style and grammar changesGravatar Boris Muratov-2/+2
2021-03-18Branding: update 'synchronise' docsGravatar kwzrd-3/+3
After previous changes, the docstring was no longer accurate. See: 1d5625a2f47a1d4d050f9eb0eb7a18e7d6fe171b
2021-03-17Branding: extend command aliasesGravatar kwzrd-2/+2
2021-03-17Branding: adjust daemon start-up behaviourGravatar kwzrd-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.
2021-03-15Info: account for defcon threshold being NoneGravatar MarkKoz-1/+2
Fixes BOT-XK
2021-03-15Defcon: fix naming conflict between threshold cmd and attributeGravatar MarkKoz-2/+2
2021-03-15Code block: remove null bytes before parsing ASTGravatar MarkKoz-0/+3
`ast.parse` raises a ValueError complaining that source code strings cannot contain null bytes. It seems like they may accidentally get pasted into Discord by users sometimes.
2021-03-15Pipenv: bump 'python-frontmatter' pin & re-lockGravatar kwzrd-19/+35
Fresh stable release, just in time!
2021-03-15Branding: decode 'meta.md' using UTF-8Gravatar kwzrd-1/+1
2021-03-14fix: more minor spelling/grammar correctionsGravatar vcokltfre-2/+2
2021-03-14fix: minor spelling correctionGravatar vcokltfre-1/+1
2021-03-14fix: add newline file endingsGravatar vcokltfre-2/+2
2021-03-14feat: add new discord.py tagsGravatar vcokltfre-0/+22
2021-03-14Branding: suppress 'ValueError' on empty-dict updateGravatar kwzrd-4/+6
2021-03-14Branding: check for empty icon cacheGravatar kwzrd-0/+4
2021-03-14Branding: add embed length cut-offs for safetyGravatar kwzrd-7/+10
This should never do anything, but it's better to be safe. Values taken from Discord developer docs.
2021-03-14Branding: provide class documentationGravatar kwzrd-2/+43
2021-03-14Branding: log correct amount of cached eventsGravatar kwzrd-1/+3
2021-03-14Branding: log event path alongside errorGravatar kwzrd-1/+1
Knowing which event failed would probably be quite useful.
2021-03-14Branding: avoid sending #changelog notification on resyncGravatar kwzrd-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.
2021-03-14Branding: make 'cog_unload' synchronousGravatar kwzrd-1/+1
Discord.py doesn't await the return value.
2021-03-14Branding: show success information in 'sync' responseGravatar kwzrd-6/+17
Now that the boolean flags are propagating from 'apply_asset', we can present them to the user.
2021-03-14Branding: propagate success-indicating boolean from 'apply_asset'Gravatar kwzrd-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.
2021-03-14Branding: do not call 'rotate_icons' from rotation initGravatar kwzrd-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.
2021-03-13Use .gitattributes to normalise line endings on check-inGravatar MarkKoz-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.
2021-03-13Branding: replace ugly lambda with 'attrgetter'Gravatar kwzrd-1/+2
2021-03-13master => mainGravatar Joe Banks-22/+22
2021-03-13Branding: add calendar command groupGravatar kwzrd-0/+63