Releases: Sonnet-Discord/sonnet-py
Releases · Sonnet-Discord/sonnet-py
Sonnet V2.0.2-1
Sonnet V2.0.2 "Long Haul"
Sonnet V2.0.2
Frontend
- Update(set-whitelist): Calling
set-whitelist
is now whitelisted for guild owners always regardless of blacklist settings - Update(mention-hint): Sonnet now has a more advanced hint, which displays not only the prefix but how to access help, and how to use the mention prefix
Under the Hood
- Add(ruff): New linter pass over codebase
- Update(LeXdPyK): 2.0.5: Patch mypy errors
- Refactor(ruff): Various small changes that ruff suggested
- Add(sonnetcommands):
parse_command_novalidate
that parses a command name and arguments from any supported prefix - Refactor(mypy/pyright): Apply new lint suggetions since the last time mypy/pyright was run
- Add(design): Markdown file containing general design guidelines for sonnet
- Add(checklist): Release checklist for new sonnet versions
Runtime Environment
- Update(cryptography): Raise min version to patch out CVE
- Change(wordlist): Differentiation was mispelled as differentiaton, spellchecked
- Add(py310): Python 3.10 to development CI, Sonnet might deprecate python 3.8 in the future, and this will ensure it works on the new target
Bugs
- Fix(starboard): Attached images not being shown due to trackerparams being added to url
- Fix(server-info): Roles feild now properly pluralizes
Roles
to sayRole
when the count is 1
Sonnet V2.0.1-1
Sonnet V2.0.1-1
Runtime Environment
- Fix(versions): Bump module versions to non dev status
Sonnet V2.0.1 "Hopes and Dreams"
Sonnet V2.0.1
Frontend
- Change(scripting): Further limits have been imposed (3 minute runtime, 200 execs)
- Add(kill-script): Ability to kill any running script via the message id it was sent with
- Change(antispam): Antispam now properly defines when it is off and can be set by the user to 'off' in the configuration commands
- Add(error_context): Some errors in sonnet now give additional private error context in the form of a ui interaction
- Change(mute): The longest mutetime is now 28 days to match discord timeouts
- Add(banner): Util function to get the banner of a user
- Change(scripting): Usage of slanted quotes will now be raised as a note to the user if there was an error parsing arguments
- Add(what-is): Command that combines every form of snowflake parsing in sonnet to guess what type a raw ID is and give rich context
- Change(nickname-logging): An unset nickname now uses more human readable text to explain the nickname is unset
Under the Hood
- Refactor(errors): Many commands have been upgraded to use CommandError and CommandError::private_message
- Change(CommandCtx): CommandCtx is now a dataclass and has slightly increased performance
- Add(CommandCtx): command_name and prefix are now accessable through CommandCtx
- Refactor(loaders): Now uses LeXdPyK 1.2 ramfs api, as LeXdPyK 2.0 is now the minimum that sonnet-core will run on
- Change(parse_user_member): Now allows requiring fetching a user regardless of cached entries (as some datums require this api call, thanks discord)
- Add(database_connection): Database connection errors that previously raised an 'uncatchable' error may now be caught for graceful database connection loss handling
Runtime Environment
- Add(cfg): Added config
STATELESS
to sonnet_cfg to disable local caching in a environment where the db may be updated by another process - Add(cfg): Added config
AUTOMOD_ENABLED
to sonnet_cfg to entirely disable automod on an instance globally - Upgrade(deps): Sonnets dependencies have been upgraded! It is reccomended to reboot sonnet after updating them
Bugs
- Change(antispam): Antispam is now disabled by default, this is a breaking change but can be considered a bug (no other automod systems are on by default)
- Fix(kick): When kicking a moderator+ user while mprotect was disabled, sonnet would send the mprotect warning text twice erroneously
- Fix(LeXdPyK): 2.0.4 applies fix for module import order erroring on new top level items being created out of sync
- Fix(timeout): passing a timeout below 0 will now properly timeout for the max of 28 days (just as mute becomes infinite when 0 is passed)
- Fix(vuln): Bump
cryptography
version due to openSSL vuln
Sonnet V2.0.0 "Farewell and Hello"
Sonnet V2.0.0
Frontend
- Add(threads/vcs): Sonnet will now fully react to message events in thread and vc channels including automod and commands
- Add(timeout): Moderation tools to facilitate timing out a user
- Add(antispam-timeout): Option to timeout users instead of muting for antispam
- Add(avatar): Make avatar have a flagswitch to grab global avatar, now defaults to guild avatar
Under the Hood
- Update(LeXdPyK): 2.0.3:
- Support dpy2.0.1
- Make reload of library imports optional
- Make multiple events able to be registered per event regardless of other modules event usage
- Add new dpy2 specific events
- Change(db_handler): Make database handler store in an interface to ensure unified api between sqlite and mariadb
- Refactor(imports): Many modules no longer reload imports as per LeXdPyK 2, significantly lowering init time
- Add(to_snowflake): Compatibility method to get around since patched dpy bug
- Add(is_guild_messageable): Clearer intent method to typeguard if an item is within a guild and messageable
- Refactor(codebase): Code has been changed to no longer use deprecated methods for dpy2
- Add(require_in_guild): Parameter to infraction processor to express commands that require a user is in the guild
Runtime Environment
- Upgrade(libraries): Libraries have been updated, you must update to run Sonnet 2.0
Bugs
- Patch(enrypted_writer): Add flush method to conform to api
Sonnet V1.2.14 "Preparing for the Light"
Sonnet V1.2.14
Frontend
- Add(mprotect): Moderator+ infraction protection tools
- Change(join-log): Join logs alone may now be disabled through
set-leave-log-is-join-log
- Change(message-log): Message logs alone may now be disabled through
set-edit-log-is-message-log
- Add(unmute-on-ban): Banned members may now be auto unmuted via
set-unmute-on-ban
- Change(purge): Purge now prints how many messages were purged and what user initiated the purge
- Change(automod): Automod is now active on bot users, this is to allow use of webhook based user accounts
- Change(rr-add/remove): Adding or removing a reactionrole will make the bot attempt to add or remove a reaction of that emoji to the message
- Change(help): Help command no longer prints full command list if length of one embed field is larger than 512 bytes, instead truncates
- Change(version-info): Will now print the time of last reload to version-info, letting users track the last patch date of the sonnet instance
Under the Hood
- Add(private_message): Privatized error message endpoint for CommandErrors
- Currently this is unused but has an api endpoint so it can be used in the future
- Refactor(antispam): Antispam code has been completely rewritten, improving readability and stability substantially
- Refactor(on_message(_edit)): Systems no longer panic on missing ban/kick/mute/warn commands in automod, instead they warn to terminal
- Update(lexdpyk): release LeXdPyK 1.4.15: improve logging and UX, make all events logged in developer mode (replaces dev.py kernel)
- Change(parse_skip_message): Add flag to allow bot users for parsing anyways, while still skipping self
- Add(lib_lexdpyk_h): BotOwners class to lexdpyk headers to allow accessing the current bot owners
- Add(parse_boolean_strict): Parse boolean clone that has a more sane api
- Deprecate(parse_boolean): Deprecate parse boolean as the better method parse_boolean_strict is now available
- Add(manualtest): Add extra ramfs assertions to manualtest
- Add(boolean_to_db_helper): Administration subcommand to parse a boolean entry to the database
- Change(reactionroles): Reactionrole data is now stored in a new format on the database in a forward incompatible way
- Downgrading sonnet 1.2.14 reactionrole data to 1.2.13-3 or below will not work as intended
- Change(filelog): Files in the file log are now stored for 60 minutes instead of 30 minutes
Runtime Environment
- Add(cached_yapf): Build tool to autocache yapf results and speed up linting time
Bugs
- Patch(allowed_chars): Spaces are now allowed in message contents before it is sent to the file logging system
- Patch(antispam): Previously sending 2 messages that should be antispammed between a lagspike would not trigger antispam, this is no longer the case
- Patch(reactionroles): Animated emojis will now work with reactionroles
Sonnet V1.2.13-3
Sonnet V2.2.13-3
Bugs
- Fix(rr-list): improper patch caused fatal errors on every run
Sonnet V1.2.13-2
Sonnet V1.2.13-2
Bugs
- Fix(rr-list): if a message was added to reactionroles and then removed from reactionroles calling
rr-list
would error on trying to make an empty embed object for its fragments- fragments are now removed on
rr-remove
andrr-list
is resiliant against this
- fragments are now removed on
Sonnet V1.2.13-1
Sonnet V1.2.13-1
Bugs
- Fix(utils): Date format string had garbage character in it
Sonnet V1.2.13 "Error.context()"
Sonnet V1.2.13
Frontend
- Add(softban): Moderation command to ban and unban a user
- Change(mute): Make duration error handling warn if no duration was specified, but one of the args was a duration
- Change(map_preprocessor): Make preprocessor print what command triggered an error, for nested stack debugging
- Add(map-expand): Command that expands the arguments to a call to map instead of running them, useful for debugging
- Add(sub): Command that runs other command as a subcommand, allows silencing output on most commands that respect verbose
- Add(sleep): Command to sleep for a set duration up to 30 seconds, useful in loosely timed scripts and as a toybox command
- Change(profile): Add "Guild Perm Level" to profile, allowing for perm visibility
- Change(help): Add how long processing took to help embed, along with version and module info when relevant
- Move(grab-message): Move
grab-message
to utils as it is no longer a moderation command - Add(mentionprefix): Mentioning bot will now act as a command prefix
- Change(parse_user_member): Make error handling try and guess what the id passed was
Under the Hood
- Change(cmd_automod): Move function signatures to
CommandCtx
, make errors raiseCommandError
- Split(cmd_moderation|cmd_bookkeeping): Split moderation module into 2 modules for easier management
- Add(wordlist): More words in wordlist, fix some spelling issues in wordlist
- Add(lib_datetimeplus): Library for easier working with datetime primitives
- Refactor(Time): Make various parts of codebase use lib_datetimeplus instead of raw datetime calls
- Add(KernelArgs): LeXdPyK arguments typesafe wrapper
- Refactor(on_message): Make
on_message
use KernelArgs - Change(lib_constants): Add missing permissions names
- Change(lib_encryption_wrapper): Remove mock encryptor/decryptor interfaces as cryptography updated its interfaces
- Add(ParseDurationSuper): Function to parse a complex form duration in pure python
- Add(parse_core_permissions): Lightweight permission parser that only parses basic permissions (no custom overloads) and has static assertions thanks to it
- Update(LeXdPyK): 1.4.12: Support pyright typechecking
Runtime Environment
- Change(dependencies): Lock all versions to semver, upgrade dependencies to latest stables
- Add(manualtest): Unit testing writing helper
- Change(autotest): Make tests return in order of first to finish, and show time took
- Add(pyright): Typechecker used by dpy for compatibility
- Remove(pytype): Remove pytype as a dependency
Bugs
- Fix(lib_mdb/sql_handler): list_tables type signature was ill formed
- Fix(starboard): Make image url parser parse more urls correctly