Modlog was the biggest culprit for seriously large documents in the MongoDB backend, since it stored all cases as nested dicts in the guild scope. So, for example, on the Fortnite server, the guild document for Kowlin's bot had exceeded 8MB.
This commit gives each case its own document. It also does the same for casetypes. Not only does it remove the possibility of the document exceeding the maximum size in MongoDB, it's also just more efficient for all backends.
Other misc changes: Fixed a bunch of type-hints, and also added more support for when an object related to a case (user, moderator, channel etc.) can't be found (because it was deleted or something rather)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* add role mentions to userinfo and reverse role sorting
This small PR adds the role mentions to userinfo and reverses the sorting so that the top most role of a user is at the left of the embed
* Remove sorting as it's handled by d.py
* Adds Schema versioning
- Adds Migration tool
- Adds tool to migrate to allow multiple admin and mod roles
- Supports Multiple mod and admin roles
* Ensures migration is run prior to cog load and connection to discord
* Updates to not rely on singular mod/admin role id
* Update requires logic for multiple mod/admin roles
* Add new commands for managing mod/admin roles
* Feedback
Update strings
Update docstrings
Add aliases
* Use snowflakelist
* paginate
* Change variable name
* Fix mistake
* handle settings view fix
* Fix name error
* I'm bad at Ux
* style fix
- Fixes defaults being mixed into custom groups above the document level when doing `Group.all()`
- Fixes `Config.clear_all()` with Mongo driver
- Fixes `Group.set()` with Mongo driver on custom groups above the document level
- Fixes `IdentifierData.custom_group_data` being set to the wrong thing in `BaseDriver.import/export_data` (although this was an inconsequential bug)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
- More errors will be logged to the console with clearer messages when something goes wrong
- Downloading the Lavalink Jar will abort after 5 failed attempts. The connect task will also abort if an unhandled exception occurs whilst downloading or connecting to Lavalink. After this occurs, instead of responding "Connection to Lavalink has not yet been established" to commands, the bot will respond "Connection to Lavalink has failed". This has no effect on other commands which don't involve connecting to Lavalink (e.g. settings commands).
- Logs this message when Lavalink jar is successfully downloaded: `Successfully downloaded Lavalink.jar (<x> bytes written)`
- Uses [`tqdm`](https://github.com/tqdm/tqdm/) to display a progress bar whilst downloading Lavalink.jar.
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
This still preserves the new event, which was a welcome change. However, context still needs to be invoked when a command isn't found, so `on_command_error` can still catch `commands.CommandNotFound`.
Fixes broken fuzzy help.
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Add inviteset group command
* Fix errors
* Fix line break
* Remove user bot support
* Fix docstrings line breaks
* Remove embed specific formatting
* Remove invite redirect
* Add self argument to _can_get_invite_url
* Remove unused import
* fix errors related to classes + double help
* Removed self bot support
* same stuff, but with some more spurious error supression
* fix issue in permissions found in this
* fix a few more spurious errors
* fix another issue
* semi-spurious error fixes
* .
* formatting
* move this to properly log
* distutils import + virtualenv
* more fixes
* [Help] Detatch menu usage into a task
- This resolves#2712
- This is a minor API change. Conceptually, the difference is minor in
nature `bot.send_help_for` returns when help has been sent, however
this can now be prior to when the help menu (if one is in use) is
closed.
- This should not be considered breaking as there is and has been a
a warning about this file's APIs being still up for unannounced modifications
No developers should be currently relying on this behavior.
* operator precendence
* [Help] Fix long cog helps
- Why do people thing a category help of over 250 characters is more
useful than putting the help in relevent commands?!
* toss an MD fix in here too I guess
* Add a timedelta converter
This reuses a lot of logic from @mikeshardmind 's scheduler cog with permission
It adds a timedelta converter
It keeps it generalized as requested
It keeps the function available for non converter use as requested
* Handle feedback
* style fix
* Add bot.send_to_owner
resolves#2665
Adds some basic methods and config entries.
Does not add commands for modifying this yet.
* Use send_to_owners in events
* handle feedback
* Add respectable aliases for consistency
* General command name for alias.py
* Forgot one for alias
* General command for filter
* General command for warnings
* Whoops
Resolves#1749