aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/backend (follow)
Commit message (Collapse)AuthorAgeLines
...
* Use bot-core scheduling and member util functionsGravatar Chris Lovering2022-04-18-1/+1
|
* Revert "Update all references of discord.py to disnake"Gravatar Chris Lovering2022-03-15-19/+19
| | | | This reverts commit 960619c23300c56c8aaa454edc7241e2badf80ad.
* Update all references of discord.py to disnakeGravatar Chris Lovering2022-03-05-19/+19
| | | | All of the tag content is out of scope for this PR.
* Merge branch 'main' into tag-groupsGravatar Johannes Christ2021-12-08-36/+26
|\
| * Dynamic views for command help embeds (#1939)Gravatar Boris Muratov2021-12-01-7/+6
| | | | | | | | | | | | | | | | | | Dynamic views for command help embeds Adds views for commands to navigate groups. For subcommands, a button is added to show the parent's help embed. For groups, buttons are added for each subcommand to show their help embeds. The views are not generated when help is invoked in the context of an error.
| * Migrate to `og_blurple` (#1901)Gravatar TizzySaurus2021-11-01-2/+2
| | | | | | Migrate to `og_blurple`
| * Fixed delayed logs and made some other minor refactors (#1863)Gravatar wookie1842021-10-17-28/+19
| | | | | | | | | | | | | | | | | | * Run debug log before help command invocation to avoid delayed logs * Refactored other areas of code slightly, ensuring logging is done as soon as possible. Removed outdated comment * Ensured debug logs were sent for disabled commands Co-authored-by: Xithrius <[email protected]>
* | Merge remote-tracking branch 'upstream/main' into tag-groupsGravatar Numerlor2021-11-09-23/+24
|\| | | | | | | | | | | | | # Conflicts: # bot/converters.py # bot/exts/info/tags.py # tests/bot/test_converters.py
| * Migrate to `bot.log.get_logger` functionGravatar Izan2021-10-14-16/+14
| |
| * Migrate all Guild.get_member calls to get_or_fetch_memberGravatar Chris Lovering2021-09-29-1/+2
| | | | | | | | This protects us against the guild cache not being fully populated with members.
| * Use scheduling create_task util instead of creating from loop directlyGravatar Numerlor2021-09-11-6/+8
| | | | | | | | | | The util attaches an error logging callback instead of relying on python's exception logging which only occurs when the task is destroyed
* | Use new command interface that accepts direct contentGravatar Numerlor2021-09-22-10/+1
| |
* | Merge remote-tracking branch 'upstream/main' into tag-groupsGravatar Numerlor2021-09-06-8/+29
|\| | | | | | | | | | | | | | | # Conflicts: # bot/converters.py # bot/exts/backend/error_handler.py # bot/exts/info/source.py # tests/bot/test_converters.py
| * Merge branch 'main' into new-discord-featuresGravatar Xithrius2021-07-20-5/+26
| |\
| | * Merge branch 'main' into drop-gpl-depsGravatar Xithrius2021-07-08-3/+24
| | |\
| | | * Updates Shh Command To Mirror SilenceGravatar Hassan Abouelela2021-05-13-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updates the shh and unshh commands from the error handler to accept channel and kick arguments, to give them the same interface as the silence and unsilence command. Signed-off-by: Hassan Abouelela <[email protected]>
| | * | Fixes N818 ComplianceGravatar Hassan Abouelela2021-07-07-2/+2
| | |/ | | | | | | | | | | | | | | | | | | Renames a couple exceptions to include the error suffix, as enforced by N818. Signed-off-by: Hassan Abouelela <[email protected]>
| * / Bump embed limit to 4096 charactersGravatar Matteo Bertucci2021-07-02-3/+3
| |/
* | Remove TagNameConverterGravatar Numerlor2021-09-06-17/+9
| | | | | | | | | | | | | | The converter was now only used to restrict requested names which can be handled by not matching a tag in the cog and not displaying output, this allows us to be a bit more generous with tag names during the command fallback when a name with invalid symbols is parsed after a group
* | Move tag identifier creation method to a TagIdentifier constructorGravatar Numerlor2021-08-02-1/+1
| |
* | Base functionality of tag fetching with groups and in file metadataGravatar Numerlor2021-07-01-2/+10
|/ | | | | | The code was restructured to hold tags and their identifiers in individual classes and some methods moved to function to detach some of the not directly related functionality from the cog class
* Address error behavior update.Gravatar kosayoda2021-04-28-2/+2
| | | | | BadUnionArgument sends command help after: https://github.com/python-discord/bot/pull/1434
* Merge branch 'main' into error-handler-testGravatar kosayoda2021-04-28-671/+740
|\
| * Raise a new NotInBlacklistCheckFailure insteadGravatar mbaruh2021-04-16-2/+2
| | | | | | | | This creates a new baseclass called ContextCheckFailure, and the new error as well as InWhitelistCheckFailure now derive it.
| * Branding: adjust duration string for 1-day eventsGravatar kwzrd2021-04-13-0/+5
| | | | | | | | | | | | | | Instead of: 'January 1 - January 1' Do: 'January 1'
| * Branding: use tz-aware datetime representationGravatar kwzrd2021-04-13-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using `datetime.utcnow` produces a tz-naive object. When converting the object into a POSIX timestamp (L212), the library then converts the naive object into UTC, which will offset it unless the local timezone is UTC. We prevent this behaviour by using an Arrow repr instead, which is by default tz-aware. Since the object already knows it is in UTC, it does not shift when converting to a timestamp. Because L233 used `fromtimestamp` rather than `utcfromtimestamp`, the timestamp then got converted back into local time, canceling the previous error. Therefore, the bug wasn't observable from logs, as the times looked correct, but were being stored incorrectly. By using `Arrow.utcfromtimestamp`, the created object will be aware of being UTC again, which is more safe.
| * Branding: log after successful fetchGravatar kwzrd2021-03-31-0/+4
| | | | | | | | | | Co-authored-by: Shivansh-007 <[email protected]> Co-authored-by: Joe Banks <[email protected]>
| * Branding: apply documentation improvements after reviewGravatar kwzrd2021-03-31-8/+8
| | | | | | | | | | | | | | No code changes in this commit. Co-authored-by: Shivansh-007 <[email protected]> Co-authored-by: Joe Banks <[email protected]>
| * Branding: target 'main' branchGravatar kwzrd2021-03-31-2/+2
| | | | | | | | | | With the branding-side PR merged, we can now target the production branch.
| * Merge: changes from 'upstream/main' & conflict resolutionGravatar kwzrd2021-03-28-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | Conflict in the lockfile resolved by re-locking the merged Pipfile. Conflict in Branding constants resolved by keeping my local version. Change in the cog's target branch to 'main' from 'master' is currently irrelevant as we targets a development branch anyway.
| | * master => mainGravatar Joe Banks2021-03-13-2/+2
| | |
| * | 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.
| * | 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
| | |