Features
- Added a
total_lengthfunction tohikari.embeds.Embed- Takes into account the character length of the embed's title, description, fields (all field names and values), footer, and author combined.
- Useful for determining if the embed exceeds Discord's 6000 character limit. (#796)
- Added attachment command option type support. (#1015)
- Add MESSAGE_CONTENT intent. (#1021)
- Custom substitutions can now be used in
hikari.internal.ux.print_banner. (#1022) get_guild()is now available onhikari.Member. (#1025)- The notorious "failed to communicate with server" log message is now a warning rather than an error. (#1041)
hikari.applications,hikari.files,hikari.snowflakesandhikari.undefinedare now all explicitly exported byhikari.__init__, allowing pyright to see them without a direct import. (#1042)
Bugfixes
-
Fix bucket lock not being released on errors while being acquired, which locked the bucket infinitely (#841)
-
enable_signal_handlersnow only defaults toTruewhen the run/start method is called in the main thread.
This avoids these functions from always raising when being run in a threaded environment as only the main thread can register signal handlers. (#998) -
Sub-command options are now properly deserialized in the autocomplete flow to
AutocompleteInteractionOptioninstead ofCommandInteractionOption. (#1012) -
Attempt to reconnect on a gateway
TimeoutError. (#1014) -
Properly close
GatewayBotwhen not fully started. (#1023) -
The async context manager returned by
File.streamnow errors on enter if the target file doesn't exist to improve error handling when a file that doesn't exist is sent as an attachment.The multiprocessing file reader strategy now expands user relative (
~) links (like the threaded strategy). (#1046)