Changelog
Sonnet V2.0.2-1
Under the Hood:
- Fix(pyright): Remove deprecated dpy1x stuff in lib_compatibility, and Protocol type mismatches (argnames with no slash)
Runtime Environment:
- Update(cryptography): Raise min version to patch out CVE
Sonnet V2.0.2 "Long Haul"
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 say Role
when the count is 1
Sonnet V2.0.1-1
Runtime Environment:
- Fix(versions): Bump module versions to non dev status
Sonnet V2.0.1 "Hopes and Dreams"
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"
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"
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 V2.2.13-3
Bugs:
- Fix(rr-list): improper patch caused fatal errors on every run
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
and rr-list
is resiliant against this
Sonnet V1.2.13-1
Bugs:
- Fix(utils): Date format string had garbage character in it
Sonnet V1.2.13 "Error.context()"
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 raise CommandError
- 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
Sonnet V1.2.12-1
Bugs:
- Patch(map): Fatal error on passing -s/-e flags to map without a command
Sonnet V1.2.12 "Feature Together"
Frontend:
- Add(infraction modifiers): Modifiers that add fields to logging embeds
- Add(mutelength): Option for mute command to display mute length to users
- Add(logging): Message content to file logging to capture arbitrary text
- Change(search-infractions): Per Page limit changed to 1-40 from 5-40
- Add(map): Add
-s
flag to map and amap
- Add(role-info): Command to return permission and usercount info of roles (extends Sonnet's "Deal With Discord" policy)
Under the Hood:
- Change(autotest): Make autotest use a typesafe wrapper around processes
- Add(unisafe): Unicode safety checker (disallows arbitrary unicode in codebase)
- Add(paginate_noexcept): Complex pagination library that attempts to fit all content within a limited space
- Add(reactionroles): Sanity limit of 750 reactionroles per guild
- Change(coinflip): Command now checks if it is a subcommand, and runs a faster loop if it is
- Add(constants): Self defined permission constants (dpy1.7.3 is out of date in this area)
- Change(urlb): Account for multiline url embeds (this is a discord "feature")
- Change(parse_channel_message): Add reply capture feature
- Add(cache_sweep): commands cache control behavior has been moved to lib_sonnetcommands
- Add(SonnetCommand.sweep_cache): Convenience method to sweep cache after a SonnetCommand runs
- Add(SonnetCommand(aliasmap)): Pass command hashmap directly to automatically reroute aliases
- Change(starboard): Add image url grabbing from message content
- Add(LeXdPyK): V1.4.10: add
--version
flag and user mentions now work for debug commands
Runtime Environment:
- Add(sonnetconfig): Warning about using re instead of re2
Sonnet V1.2.11-1
Bugs:
- Fix(search-infractions): Fatal error would raise instead of erroring normally on a shlex parse failure
Sonnet V1.2.11 "PythonicT"
Frontend:
- Change(infractions): infraction perm failure messages will now refer to the bot using the bots name
- Add(ban): -d parameter to specify amount of days to delete messages for
- Add(search-infractions): -f parameter to filter with regex
- Change(search-infractions): arguments are now split using shlex, meaning quotations may be used
- Add(grab-message): -r flag to send the message contents as a file, bypassing discord rendering bugs
- Add(help): help now says when you have the permission listed in per command help
- Add(help): -c flag to only scan for a command, previously if a category and command had the same name it would jump to the category
- Change(version-info): now prints what implementation of python is being used
Under the Hood:
- Add(cmds_to_html): now test for correct permspec on custom permissions
- Add(lib_tparse): typesafe argument parsing library for commands
- Add(CommandCtx): a typesafe ctx object that may be passed to commands instead of kwargs, new api has been implemented without breaking old commands
- Improve(infractions): a "failed to dm" info message will not halt processing of the ban success message anymore
- Refactor: a test set of commands have implemented commandctx with no issues and are more easily typesafe
- Change(cmd_scripting): commands have been reworked to use CommandCtx, making them more readable
- Change(help): split into smaller subcommands to improve readability
- Add(help): ability for modules to supply their own help page, allowing for guild level custom help
- Add(CommandError): a special exception that will print to the user and exit normally instead of raising to the kernel from a command context
- Add(enum_context): nested context manager for a specific dbenum, allowing more concise and less error prone code for accessing said enum
- Add(parse_user_member_noexcept): concept function that raises a commanderror on failure, nominally lowering boilerplate at the call site
- Add(parse_channe_message_noexcept): concept function that raises a commanderror on failure, nominally lowering boilerplate at the call site
- Add(CallCtx,CallKwargs): call modifier functions for easily adapting to new CommandCtx based api
- Change(grab_filter_infractions): now accepts true/false/None for automod, allowing filtering both ways or neither ways
- Change(LeXdPyK): V1.4.8: argparse is now used to aide in commandline arguments, file uses main function instead of segmented startup
Runtime Environment:
- Upgrade(libraries): sonnet has upgraded library versions and added a new library (typing-extensions), you may need to install these to update properly
Sonnet V1.2.10 "Hardened Steel"
Happy Anniversary!
Frontend:
- Add(list-mutes): Command to list all muted users in mutedb
- Add(remove-mute): Command to remove userid from mutedb
- Change(on_message): Bot will only say its prefix if being mentioned is the entire message
- Add(rejoin-mute): Muted users will be remuted on rejoin
Under the Hood:
- Add(classes): Empty
__slots__
to all classes to lower memory footprint
- Change(commandapi): Commands no longer need to specify a cache or permission behavior
- Add(db_hlapi.fetch_guild_mutes): Function to grab a guilds mute table
- Add(has_default_avatar): Helper function to check if a user has a default avatar
- Change(lib_compatibility): Version checks now happen at init time, not runtime
- Add(lib_sonnetcommands): Helper to wrap and type a sonnet command
Runtime Environment:
- Add(BOT_NAME): Config to set the name of the bot
- Add(confcheck): Most string configs are now validated at init time
- Upgrade(dependencies): Sonnet now builds and tests with latest libraries, be sure to update sometime!
Bugs:
- Patch(mute-recovery): Make mute recovery only print users to unmute that are not no unmute users
- Patch(user_avatar_url): Would not grab default avatar in 2.0
Sonnet V1.2.9 "Real Users"
Frontend:
- Add(remove-regexblacklist): Remove a regex by its index
- Change(search-infractions): Only specifying a uid will default to user infractions
- Change(help): Typing
help 2
etc for a second help page will prompt the user the correct syntax
Under the Hood:
- Add(clang-format): C formatter
- Change(cloader): Make cloader use long in place of int for arbitrary temp numbers
- Add(slots): Add dunder slots to many classes, lowering class overhead
- Add(format_duration): End user duration formatting for arbitrary seconds (used in mute)
- Change(lib_db_handler): Libraries are now more memory efficient by replacing list comprehensions with generators
- Add(db_hlapi.list_enum): list_enum call to list all primary keys in an enum
- Add(LeXdPyK): 1.4.6: Previously mentioned dunder slots and encoding specifiers
Bugs:
- Patch(encoding): Make all file opens specify utf8 encoding
Sonnet V1.2.8-1
Bugs:
- Patch((un)ban|kick): reasons over 512 would error on discords reason end
Sonnet V1.2.8 "Chronos Across Worlds"
Frontend:
- Change(set-viewinfractions): Improved grammar substantially
- Add(url-blacklist): Add url blacklist system
- Add(list-automod): --raw flag to dump to file
- Change(version-info): Discord.py renamed to Wrapper to support pycord going forwards
Under the Hood:
- Change(cloader): Refactored to use memory safe string header implementation
- Change(cloader): Now compiles with
-Wall -Wextra -Werror -O3
- Add(LeXdPyK): Testing for ramfs functionality in CI
- Add(csv blacklists): Add validation of characters inputted to prevent user errors, add - rm flag to clear
- Add(csv blacklists): Overall cleanup on system
- Add(lib_compatibility): compat system to allow the bot to run on dpy/pycord 2.0
- Add(lib_loaders): datetime_unix call to make a datetime from a unix timestamp
- Add(lib_starboard): Starboard deduplication library to prevent non uniform functionality
- Add(LeXdPyK): LeXdPyK 1.4.4, faster and more flexible than 1.4
- Change(db_hlapi): Values that take a sentinel None now check for None, type checks now use isinstance
Runtime Environment:
- If you used LeXdPyK 1.4.1 or 1.4.2 during the development of 1.2.8, you must swap to >=1.4.3 as there is a ramfs bug causing caching errors
Bugs:
- Patch(RegEx blacklist): Multi capture group regex would error the automod parser, it no longer does
Sonnet V1.2.7-2
Bugs:
- Patch(antispam): if a user was muted indefinitely and antispam was triggered and antispam was set to auto unmute (non 0 mutetime) the user could escape the indefinite mute via antispam remuting them, this is patched by adding indefinite mutes as a 0 in the mute database, ensuring antispam doesnt clobber it.
Sonnet V1.2.7-1
Bugs:
- Patch(search-infractions) Improper bounds check on page index caused fatal error if page queried was one above limit
Sonnet V1.2.7 "Start of the Road"
Every end to a road is the start of another.
Frontend:
- Add(starboard-forceboard): allows forcing a message to be starboarded
- Change(mute): under gotools parser, 5m2s type parsing is allowed now
Under the Hood:
- Change(search-infractons): Improve infraction renderer to show most amount of chars possible
- Add: gotools library to handle time parsing
- Add: gotools GenerateCacheFile (10x as fast as python variant)
- Change: move alot of code to use io.StringIO
- Add: dpy-stubs typing to codebase
- Change: remove --implicit-reexport mypy flag as its no longer needed
- LeXdPyK 1.4: support for dpy typing, faster ramfs multi dir lookups
- Add(lib_sonnetconfig): Support for dynamic config loading
- Change: reformat wordlist to be alphabetic, add new words
- Change(parsedate): parsedate functions now take optional datetime to conform to dpy typing
- Add: Starting stubs for a new database version, this is not finalized
Runtime Environment:
- Add: new configs without breaking old config files:
GOLIB_LOAD
and GOLIB_VERSION
Bugs:
- Patch(datetime): timestamps are now more uniformly UTC on non UTC system clocks
- This does not affect antispam as dpy datetimes are non aware
- Patch: Remove alot of race conditions and channel type errors by adding dpy typing
- Patch(help): Help command total commands count was not correct
- Patch(cloader): Make cloader differentiate between processing error and FileNotFound
- Patch(update_log_channel): now checks for type of channel, must be TextChannel
Sonnet V1.2.6-2
Bugs:
- Security: Limit map, amap, and sonnetsh to not run more than 1000 iterations
- FastPass: Move member-is-user race cond to main as its more common than expected
Sonnet V1.2.6-1
Bugs:
- Patch: Accidentally exponential sonnetsh shell expansion exploit
Sonnet V1.2.6 "A Voice and a Void"
Frontend:
- Add: asyncmap/amap, allows for faster concurrent command execution, but fares poorly with error handling
- Add: some parserlibs now detect when their db entries are corrupt and warn the end user
- Add: paging to help command, 25*25 limit no longer exists
Under the Hood:
- Add: cache directives: a way for caches to specify an exact cache dir or file to remove, allowing for turing complete and finer cache control
- Change: infraction processor now grabs infraction time once
- Add:
automod: bool
flag to commands api, used by infraction processing commands
- Deprecate: db_hlapi(lock: threading.Lock=), it could cause async deadlock
- Change: on_message_delete now supports logging 4000c messages
- Deprecate: lib_loaders.inc_statistics, just use inc_statistics_better
- Deprecate: db_hlapi.add_to_starboard, db_hlapi.in_starboard
- Change: lib_encryption_wrapper.encrypted_reader errors are now custom, they inherit from the same exceptions so they should not cause errors to preexisting code
- Add: some documentation to lib_loaders and lib_parsers functions
- Change: SONNETAES errors now just purge files and does not top level error
- Add: db_hlapi.hlapi_version that says what api version it is on
- Add: db_hlapi now checks the underlying db config version, this will let us change it later and upgrade old dbs
- Add: delete_enum: deletes a row in the enum table
- Deprecate: db_hlapi.database, you are not supposed to call this anyways, the new internal endpoint is db_hlapi._db
- Add: documentation to some db_hlapi endpoints
- Add: LeXdPyK 1.3.4: supports strict type checking
Runtime Environment:
- Add: strict mypy type checking (woo)
- Add: BANNED.md, the no list of sonnet
- Change: cmds_to_html now validates cache names and validates all items required by kernel
- Change: cmds_to_html now uses rudimentary html escaper for sonnet inputs
- Change: dependency version bump on all deps
Bugs:
- Change: emoji validator from 2 max chars to 5
- Fix: starboard-count accepted float input, caused infinities errors, now no longer does
- Fix: race condition with blacklist parsing on members becoming users
- Fix: help command no longer errors on a command module with no commands (this is stupid but ok)
Sonnet V1.2.5-1
Bugs:
- mariadb server version was not properly queried, oops
Sonnet V1.2.5 "Gatekeeper"
Frontend:
- Add: error handling for GDPR download files too big to upload
- Add: leave-log and message-edit-log overloads to logging channels, allows better seperation
- Add: joinrules command subsets, allows user, timestamp, and default pfp warnings
- Add: Show who the bot could not dm in infraction logging
- Add: error parsing for forbidden errors on sending embeds
- Add: search-infractions new flag for infractions per page
- Change: sonnetsh/map now tell how long it took to execute and print a sucess message
- Change: profile/pfp now support parsing members not in guild
- Change: help command now shows total commands and total endpoints
- Change: serverinfo now shows top role as a mention
- Change: deletion log timestamps now show message creation time, not deletion time
- Change: parse_log_channel and parse_role now allow typing remove|rm|delete to remove the log item
Under the Hood:
- Add: more typing to build_tools
- Add: more typing to sonnet core and everywhere
- Change: Seperate files from discord.File in GDPR command
- Add: constants library for discord limits and sonnet error strings
- Add: delete_config db_hlapi endpoint
- Add: db_hlapi lock kwarg to allow for locking database queries per guild
- Add: lib_parsers.parse_user_member to parse a user and member object from args
- Change: search-infractions now uses SQL to query for infractions
- Change: search-infractions now uses math to calculate page counts
- Change: sonnetsh/map now use try: finally: syntax to gaurantee the message.content is not lost
- Add: limits to deletion and editing logs to not go over (cause 4k char limits)
- Add: dummy typing class for cryptography
- Add: cmd_module, dlib_module and _dict counterparts to lib_lexdpyk_h
- Add: lib_loaders endpoint to get_guild_lock for threadlocks
- Add: TEXT_KEY endpoint to db_handler that says if TEXT is allowed to be used as a key or not
- Add: make_new_index endpoint to db_handler to allow for creating indexes
- Add: multifetch_rows_from_table endpoint to db_handler that allows fetching based on multiple datapoints
- Add: multicount_rows_from_table endpoint to db_handler that allows fetching a count of the db query instead of the data itself
- Add: ping endpoint to db_handler to ping if db connection is alive
- Add: Deprecationwarning on lib_parsers.ifgate
- Add: docstrings to all lib_parsers endpoints
- Add: LeXdPyK V1.3.3:
- Add: typing to all of kernel
- Add: error logging to err.log
- Add: errors are not raised to dpy, instead printed with traceback by the kernel
- Add: handle discord.errors.Forbidden on sending error messages from kernel
- Change: grab_files returns bare io.BytesIO discord.File to allow for no underlying circular references
- Add: grab_filter_infractions to db_hlapi, deprecates grab_user_infractions and grab_moderator_infractions
Runtime Environment:
- Add: autotest easy threading test script
- Change: bump requirements
Sonnet V1.2.4 "Over the Rainbow"
Frontend:
- Better confine antispam config bounds
- add Char Antispam
- Add guild specific color options
- infraction-details and delete-infraction now show unix timestamps
- add replying to field in deleted message logs
Under the Hood:
- Add sonnet embed color system
- embed_colors and load_embed_color endpoints added to lib_loaders
- More typing added
- minor polishing on commands while typing them
- add inc_statistics_better endpoint that supports better type checking
- add lexdpyk_h for ramfs typing
Sonnet V1.2.3 "Eternity"
Frontend:
- mutetime-set alias to set-mutetime
- Infraction logging changed to have better timestamps and user mentions
- purge command added
- pfp added as alias to avatar
- rr-rm and rr-ls aliased to rr-remove and rr-list
- help command now prints all commands on default helptext
- add timestamps to user joins and nick updates
- add false print to a nonetype nickname in nick logging
Under the Hood:
- Massive amounts of static type checking added, decreasing room for bugs
- set-prefix now grabs config cached prefix instead of db, replaces None with DEFAULT_PREFIX
- basic emoji validation added to rr
- rr commands changed to use inline error handling
- json datatype added to cache, uses pickling to improve speed
- db enumeration V1 rolled out, introduces grab_enum, set_enum, and inject_enum for runtime specific database schemas
- antispam moved to vnum numbers
- antispam added char count for later charantispam
- improve on-message forbidden perm check handling
- speed up startup jobs with walrus
- directbinnumber and vnum writes sped up thanks to builtins
- cache loader now uses vnum allocation
- cache loader now loads defaults at load, not generation
- cache loader now uses tail call recursion to grab values
- ifgate method sped up by just using "any" builtin
- LeXdPyK 1.3.2: support type checking and do not delete messages on kernel blacklist
Runtime Environment:
- cloader modified to work on x32 hardware, in theory
Bugs:
- set jkb to dissallowed mentions
- Spelling pass over codebase
- fix on-delete erroring on dm events
Sonnet V1.2.2-1
Bugs:
- Fix race condition where a member object could become a user object while processing perms
Sonnet V1.2.2 "A Moderation Focused bot"
Frontend:
- Add stricter input validation to set-antispam
- Add set-mutetime command
- unban and unmute now insert reasons and logs into database
- note infractions are like warns but dont log to infraction log or dm the user
- Infraction searching now supports negative indexing
- rr-purge added to remove all reactionroles from a message
- map now takes -e parameter for appending args to the end of every command
- Add absolute totals to % totals in statistics command
- Support floating point seconds in antispam time
Under the Hood:
- Added return state to most commands, allows sonnetsh and map to stop execution after a failure
- Remove unneeded imports from all files, this is thanks to the new addition of pyflakes and pylint in the workflow
- GDPR now instancizes commands before running them
- General infraction processor is no longer garbage
- now gaurantees a user object or failure
- can specify to not add an infraction to logs but put it in the database
- just look at it its so much cleaner
- muting a user now first clears them from the mute database and unmuting will also clear them from the database
- Ping function now uses timestamp generation template function
- Uptime printing now uses shared function, no longer prints as "days" when the count of days is 1
- Userupdate no longer checks for changed usernames as that event happens on on-user-update
- Update kernel to LeXdPyK 1.3.1
- Updates to support discord.py 1.7 deprecations
- error printing is now pretty
Runtime Environment:
- Make re2 optional
- Make loading the C lib optional
- Add default lite config for running the bot without mariadb or re2
- Move requirements.txt to requirements.txt and requirements.extras.txt to allow for not installing re2 or mariadb
Bugs:
- Fix jkb on a non user would print None
- Fix negative mute times that would proceed to not mute
- Infraction searching no longer goes to last page when 0 is passed into it
Sonnet V1.2.1-2
Bugs:
- Regex with / in name would cause the ramfs to create folders, fixed by hashing and hex valuing file names
Sonnet V1.2.1-1
Bugs:
- Some awaitable shit wasint awaited
Sonnet V1.2.1 "Expand Beyond"
Frontend:
- Added join and leave logging
- General update on all libraries to use ERROR: in their return syntax
- Version command now prints Clib version grabbed from DotHeaders
- Automod infrations now print the item that was blacklisted
Under the Hood:
- Sonnetsh now makes a virtual message content to allow for more scripting possibilities
- Permissions parser now supports reading custom permissions
- Profile command flattened to use parsedate
- DotHeaders added for easier loading of clib functions
- Return tuple instead of list from lib_handlers
- Comments added to all lib parsers functions
- Lib parsers does not parse all permissions unless needed, shaving off minor processing time
- Clean up db_hlapi add_infraction to use zipping
- Retab and speed bump C loader
- Update to LeXdPyK 1.3
- Supports multi bot owner
- Supports removing blacklisted users/guilds while running
- Prints error message to discord instead of just generic text
- Supports parsing multiple commands per event
Runtime Environment:
- Add upload function to db_hlapi
Sonnet V1.2.0-2
Bugs:
- delete-infraction on nonexistent infraction would fatal error
Sonnet V1.2.0-1
Bugs:
- patch error in encrypted reader
Sonnet V1.2.0 "Waterfront"
Frontend:
- list-blacklist renamed to list-automod
- upload file on rr-list being overloaded instead of just error messaging
- add map command to run one command with multiple arguments
- update profile command to be more accessible (removed reliance on colors)
- add support for individual command help
Under the Hood:
- update profile command to be cleaner internally
- database connections moved to self handling connection cache
- infraction grabber no longer relies on message.content allowing sonnetsh scripting
- add support for rich descriptions in command help
- speed optomizations to lib_encryption_wrappr
- support for file like objects in lib_encryption_wrapper
Runtime Environment:
- rename cmd_blacklist.py to cmd_automod.py
- rename dlib_reactions.py to dlib_starboard.py
Bugs:
- patch embed overflow 0 day in help command
Sonnet V1.1.6-1
Bugs:
- sonnetsh moved to moderator command
Sonnet V1.1.6 "_sh"
Frontend:
- Add sonnetsh command
- Add rr-addmany and rr-list
Under the Hood:
- Optimize infraction searching sort system
- Add verbose flag to command api
- Add commands dict to command api
Bugs:
- Perm check on starboard message sending
Sonnet V1.1.5-2
Bugs:
- starboard confset commands fatal errored on no input
Sonnet V1.1.5-1
Bugs:
- reactionroles were broken on non unicode emoji
Sonnet V1.1.5 "Hard Split"
Frontend:
- Add username change logging
- Add reactionroles subsystem
Under the Hood:
- Change lib_parsers to have unique error types
- Refactor ramfs storing to use unified
guild_id/data
from root dir
- Refactor statistics to use dict objects instead of vnum datatype
- Add cache configs to database cache loader
- Add parse messageid lib, this will be replacing self handled messageid libs in later versions
Runtime Environment:
- Remove win build scripts, these are legacy and were never maintained
Sonnet V1.1.4-2
Bugs:
- re.match does not match the same way that re.findall does
Sonnet V1.1.4-1
Bugs:
- deprecation warning on jban was completely nonfunctional
Sonnet V1.1.4 "Droplets of Salt"
Frontend:
- Infractions now check role hierarchy
- Jban renamed to jkb
Under the Hood:
- New kernel (LeXdPyK 1.2.1) with new features and stability
- Offers new f_type and f_args for ramfs
- Encrypted token boot using miniflip encryption
- Blacklisting
- Logging file system
- Return values on debug commands
- Remote shutdown of bot
- Stability in event of broken module load
- Regex blacklists are stored as compiled objects
- Optional compile C acceleration for wordlist loader
Runtime Environment:
- Option for encrypted token boot
Bugs:
- Muting a user and then banning them caused mute timers to error out
Sonnet V1.1.3-2
Bugs:
- Remove on-raw-reaction-add from starboard, it only existed to grab messages not in the cache but it has caused too much trouble for what it is worth
- the on-raw-reaction-add call is also needed for V1.1.4 Reaction Roles, so cleaning it up beforehand helps
Sonnet V1.1.3-1
Bugs:
- Fix unbanning user that doesn't exist causes fatal exception
Sonnet V1.1.3 "The Value of a Name"
Frontend:
- Add admin role setting
- Add moderator role setting
- Add aliases to commands
- Show current config on all config set commands with empty input
- Rename antispam-set to set-antispam
- Rename blacklist-whitelist to set-whitelist
- Send to log channel when dmming a user an infraction failed
- Refactor search-infractions to allow grabbing by mod or by user
- Add channel to starboard embed
Under the Hood:
- Add conf_cache to commands api
- Moved role parsing to shared processor
- Improve sort on search-infractions
- Refactor the help command again
- Garbage collection on file objects once deleted
- Improve encryption_wrapper to be seekable and peekable
Bugs:
- Readback error in encrypted_reader
Sonnet V1.1.2 "Flashback"
Frontend:
- Add regex notifier system
- Add usermention to infraction commands
- Add flags to search-infractions
- Allow parsing URLs in grab-message without disallowing additional args
- Add replies to grab-message
- Change profile command status to show status as a color
- Change @ing bot to only work when bot is directly mentioned
- Add replies to starboard
- Return log channel as channel object instead of int when displayed
Under the Hood:
- Make grab-message parse files every time
- Refactor on-message automod to not use, well whatever that thing was
- No longer attempt to log files if a message is deleted instantly
- Close encrypted files when done reading them, possibly caused errors
Bugs:
- More random errors that apparently raw-reaction-add has
Sonnet V1.1.1-2
Bugs:
- FINALLY the on-raw-reaction-add bug was found and patched
- THIS BUG HAS EXISTED SINCE 1.0.1
Sonnet V1.1.1 "Privacy has no Cost"
Frontend:
- Improve docs on antispam-set
- If mutetime >= 256 hours, default to no unmute
- Add grab-message command
- Add poll command
- Add coinflip command
- Add python version to version-info
- Add deleted file logging
- If bot is mentioned it will now give guild prefix
Under the Hood:
- Add gif,webp to starboard image scanner
- Desort wordlist loader, increases max possible combinations at cost of speed
- Skip blank lines in wordlist loader, allows flexibility in wordlist.txt
- Add encrypted fileio wrapper
- Move blacklist whitelist to completely skip blacklist parsing
- Improve handling of raw-reaction dblocking
- New kernel supports proper tree and ls commands
Runtime Environment:
- Add cryptography and lz4 dependancy
Sonnet V1.1.0-2
Bugs:
- Patches to dmmessage errors
- Move bot to re2 parser, patches regex fork exploit found by Vord
Sonnet V1.1.0-1
Bugs:
- Discord websocket hiccup accounted for in antispam
- Starboard no longer breaks down
Sonnet V1.1.0 "The all Seeing eye"
Frontend:
- Remove joinlog command
- Add antispam-set system
- Rename blacklist category to automod category
- Add joke ban command
- Change mute command to be mute [time] [reason]
- Add infraction-search of members not in guild, add infraction count to infraction search
- Change ping command to represent blacklist and antispam as just automod
- Add serverinfo command
- Add padding to uptime and version-info uptime counters
- Add 1 and 0 as valid boolean inputs
- Add color to version-info
- Add statistics command
- Make starboard timestamps show starred message timestamps
Under the Hood:
- Add statistics system
- Add kernel ramfs that is persistent
- Ability to ban/warn members not in guild
- Faster async based processing of infractions
- Make wiwb space stripping work correctly
- Split message handlers into 3 files
- Add vnum processors to statistics system
- Make LeXdPyK kernel, includes more headers and a inbuilt ramfs, new Kapi, and cleaner layout
- Do antispam and blacklist actions in async to lower response times
- Move ramfs into kernel
- Add smart image detection of message images to starboard
- Make database hlapi not create db on every call
- Process commands in async to not inturrupt main thread
- Make db_obfuscator only load sonnet dbs
Runtime Environment:
- Add LeXdPyK kernel configuration
- Remove sqlite3_type from sonnet configuration
- Add documentation of kernel api, command api, event handler overview, quickstart guide
- Version bump to discord.py module
Sonnet V1.0.2 "EndlessTime"
Frontend:
- Add uptime command
- Add starboard for old messages and images
- Fix starboard boarding messages in starboard channel
- Improve version-info command
Under the Hood:
- Rewrite portions of help command to make it less bad
- Change db connection type to keep connections open per module
- Convert lib_sql_handler to unix line endings
Runtime Environment:
- Make all static libs able to be edited during runtime
Bugs:
- Fix editing null message caused by images
- Fix dmmessage errors
- Fix editing messages over 1024 len causing error in embed field limits
Sonnet V1.0.1-1
Bugs:
- Fix fatal flaw in profile command that stemmed from misreading code initially
Sonnet V1.0.1 "Collision of Worlds"
Frontend:
- Add antispam to mainloop processor and gdpr system
- Add caches to gdpr downloader
- Improve documentation of commands
- No longer break on list-blacklist over 2k characters
- Add unban message
- Improve grammar on infraction commands
- Add mutetime response to mute command
- Add curcount return to starboard-count command
- Add version-info command
- Update blacklist processor to be less prone to bypasses
- Add logchannel setting no input to show the current log channel
Under the Hood:
- Fix all mutetimer collision
- Change command processing to kwargs system
- Add version info to all command modules
- Move all message handling to dynamiclibs
- Add mute recovery subsystem, may collide timers but its better than all mutes being dropped
- Change message config loader to be more modular
- Update db_handler's to include list_tables command
Runtime Environment:
- Remove support for rhea type databases that have shown to be problematic
- Remove support for python 3.7 and python 3.6 in favor of cleaner future proof code
- Add SONNET_TOKEN alongside RHEA_TOKEN for environment vars to get token from
- Added warning for bot not having token
Sonnet V1.0.0-1
Bugs:
- patches to various minor bugs
Sonnet V1.0.0 "QuickSilver"
Initial release