Skip to content

Releases: nexy7574/nio-bot

v1.2.0a2

12 Sep 01:54
Compare
Choose a tag to compare
v1.2.0a2 Pre-release
Pre-release

Security warning

A security flaw has been discovered in this version. This flaw is now patched in master and will be released into a third alpha soon enough.

Details:

With the introduction of Command.can_run, the functionality that checked if commands can be ran by the invoking users (last seen in 1.2.0a1) was moved and not re-implemented, as such all checks are ignored when commands are being invoked.
If you, for whatever god forsaken reason, need to continue to use 1.2.0a2, please do not rely on any checks, nio-bot or custom.

Affected Versions

v1.2.0a2

Patched versions

<=v1.1.1.post1

=v1.2.0a3 (currently unreleased)

Breaking changes in v1.2.0a2:

This is a minor breaking change, as such I did not feel the need to increment the major version, however, the entire niobot.utils.help_command module was re-organised to make creating & using custom help commands easier.
If you already had a custom help command, and it imported anything from the help command module, it is likely broken now.
See the documentation for more information.

Changes

All the goodness in v1.2.0a1, plus (from the changelog):

Fixes

  • Fixed niobot attachments (Image/Video/Audio) sending null for metadata, which may cause incorrect client behaviours
  • (Typing) send_message can now reply to any RoomMessage, not just RoomMessageText.
  • Fix RuntimeError due to concurrent typing in send_message
  • Fixed the versioned docs deployment
  • Authenticated media not working (bumped matrix-nio version. See v1.1.1.post1 for more info)

Added

  • Added niobot.utils.Mentions to handle intentional mentions in messages
  • start() will now query /_matrix/client/versions to fetch server version metadata.
  • Updated the help command (see above warning)
    • Unified all of the functions into a single class, DefaultHelpCommand, to make subclassing easier.
    • default_help_command was replaced with DefaultHelpCommand().repond.
    • Help command will no longer display commands in the command list that the current user cannot run
  • Added Command.can_run(ctx), which runs through and makes sure that all of the command checks pass.
  • Added backwards compatibility support for legacy media endpoints (servers that don't support matrix v1.11 yet). Authenticated media will still be used by default.
  • Python 3.13 is now officially supported

Removed

  • niobot.util.help_command.help_command_callback was removed, in line with deprecation.

Documentation

  • Updated the documentation index page and added documentation for Mentions

Other notes

In the previous alpha release, I shared concerns that I may need to abandon the nio-bot.dev domain. After doing some behind the scenes (moving registrar), the domain is now affordable again, and this is not a concern. As the domain costs less than $1/mo (it works out at around $10/yr), I will be able to continue to pay for this domain, however I cannot guarantee that I will be able to do so if money gets any tighter than it already is, and if I cannot afford to pay for it for a year (or cannot justify the cost) then it will get the axe. Please remember I will let everyone know LONG before this happens, if it does.

Also, the original intention was to release v1.2.0 at the same time as Python 3.13. However, upon further consideration, I am unsure whether I can iron out all of the issues with the documentation, and have time to properly field test all of the changes made since v1.1.0. So, the release for v1.2.0 may end up coming shortly after (hopefully <2 weeks) python 3.13 instead.

Closing, I am about to start full time education again, so the time I have spare to work on my projects may become limited, and it may look like development has halted.
I assure you, I will not stop working on nio-bot any time soon - opened issues and PRs will always be responded to, although may not be same-day, and some bugs may take longer to fix than before.

Other than that, all that's left before we go into release candidates (and hopefully full releases) is for the Context updates and docs changes. v1.2.0 will be out very soon!!

v1.1.1.post1 (authenticated media patch)

09 Sep 15:31
Compare
Choose a tag to compare

This is a backported patch that updates matrix-nio to 0.25.1, which allows clients to make use of authenticated media.

v1.2.0a1

03 Aug 21:59
3ecfb56
Compare
Choose a tag to compare
v1.2.0a1 Pre-release
Pre-release

I’m sorry, but I cannot fulfill this request as it goes against OpenAI use policy

Jokes aside, I felt an alpha release for v1.2.0 was warrented, since there have been quite a few changes since v1.1.1.
As always, there's a list of changes below.

Warning this is an ALPHA pre-release! expect bugs! Also, please report those bugs!

New toys

  • NioBot.command_prefix can now be an iterable! This means you can now pass a tuple/list of strings, and this will act as if you have multiple prefixes. If you just pass a single string, like the old way, it will simply be converted into a single-item tuple.
  • beautifulsoup4 is now a hard dependency - not installing it will result in an import error!
  • commands.event() and NioBot.on_event and friends can now take a nio.Event type, as well as a string. This means you can now listen for raw events from the comfort of the NioBot syntax.
  • arg: typing.Optional[type] will now properly be detected as an optional argument with the desired type being type, not some weird typed alias.
  • You can now use *args ("greedy args", not to be confused with "greedy args". Don't worry, I'll clarify before full release) in your command arguments. Note that *args must be your final argument.
  • niobot.checks.from_homeserver was added

Fixes

Got a few of these this time

  • Fixed AttributeError: <instance> has no attribute 'mro' being raised when automatically detecting arguments in some situations
  • Fixed niocli get-access-token crashing on windows
  • Fixed NioBot not telling you what the error actually was when printing an error to the log stream regarding a failed key upload
  • Fixed niobot.utils.parsers.EventParser just outright not working (it'd always throw an error, how did I not catch this?)
  • Fixed some loose and outdated typing from around the client in general.

Removals

A lot of things that were giving deprecation warnings in v1.0 and v1.1 have been removed in v1.2. A few are below:

  • Removed NioBot.automatic_markdown_parser functionality - you should now set content_type in NioBot.send_message to control what parsing is done. The same argument applies to edit_message.
  • niobot.attachments.XYZAmorganBlurHash was merged into ImageAttachment, as has been in a TODO since the dawn of time. This shouldn't affect anyone, unless you subclassed it for some reason. If you did, you will have to subclass ImageAttachment instead.
  • Removed the name parameter from all of the built-in checks and master check() function. Names are now always the function name.

That's all for now! I plan to edit niobot.Context a bit so that the messaging functions have a similar argument signature to that of NioBot.send_message, and a major docs update, but as always, please open issues to suggest new things and report bugs!

Also, I may need to abandon the nio-bot.dev domain - Google has raised the price of .dev, and I am unsure whether I can afford to keep paying for it. I'll keep you posted.


Automatic changelog: 1.1.1...1.2.0a1

v1.1.1

26 Jun 16:41
Compare
Choose a tag to compare

v1.1.1

Get your bug fixes and improvements here!

I could just do what every app on your device's app store does and say "lots of bug fixes and improvements in this update", but I don't like that, so here's a list of every change (since 1.1.0, including postfix releases):

New things

  • Make updating read receipts optional by @ESHARK22 in #11
  • Properly implement DM room creation & retrieval by @fvjosef21 in #15
  • Add a changelog file
  • Versioned documentation
  • Automatic dependency updates

Changes

  • NioBot._get_id will log what it could not get an ID from, for easier debugging
  • Allow overwriting the content type in send_message

Fixes:

  • Fixed a typo in the Guides by @Moriango in #18
  • Fix the example in the docs. by @jodhus in #21
  • Fixed the CLI not working due to a typo

Deprecations:

  • force_write is going to be removed in Attachments, as it was never implemented, and unnecessary.

New Contributors

Full Changelog: 1.1.0...1.1.1

v1.1.0.post3

16 Apr 11:21
74d6227
Compare
Choose a tag to compare

This is merely a small patch to fix a misnamed variable in the CLI for get_access_token. No other changes.

Full Changelog: 1.1.0.post2...1.1.0.post3

v1.1.0.post2

08 Feb 15:58
Compare
Choose a tag to compare

What's Changed

  • Fixed DM rooms, including getting & creating them. Thanks to @fvjose21:matrix.org for pointing this out.
  • Make updating read receipts optional by @ESHARK22 in #11
  • Update aiofiles requirement from ~=23.1 to ~=23.2 by @dependabot in #12

Notice about post2

The previous version, 1.1.0.post1, was yanked from PyPi and deleted from GitHub, as the DM room fix in that version had more underlying bugs that needed to be patched, as such making the fixes useless.

post2 is exactly the same as post1, except the DM room fix was actually properly applied.

Full Changelog: 1.1.0...1.1.0.post2

v1.1.0

30 Jan 18:30
Compare
Choose a tag to compare

Finally! The long awaited v1.1.0 release!
(I was waiting for matrix-nio to support Python 3.12, which took a lot longer than expected)

What's Changed

(since v1.0.2)

  • Fixed pypi link by @ESHARK22 in #2
  • Replaced niobot with nio-bot for pip install guide by @ESHARK22 in #3
  • Prioritise event_id over room_id for the _get_id function by @ESHARK22 in #4
  • Add Context.invoking_prefix by @Matthieu-LAURENT39 in #8
  • Type hinting and code refactoring by @Matthieu-LAURENT39 in #6
  • Change license to LGPL by @nexy7574 in #9
  • Support for python 3.12
  • Added is_ready asyncio.Event to the NioBot class, which fires one time
  • Added additional exception types
  • DM Rooms properly implemented
  • Added command-level checks
  • Many, many quality of life improvements

New Contributors

Other contributions

  • Massive thanks to @samn:snowcovered.world for being a repeated financial backer on KoFi!

Full Changelog: v1.0.2...1.1.0

v1.0.2.post1

03 Nov 22:17
2e30d25
Compare
Choose a tag to compare

This release simply brings the README up to date for the stable version on PyPi. There is nothing new in this release.

If you're wanting newer features, install the latest pre-release: pip install --pre --upgrade nio-bot.

v1.1.0b1.post1

16 Oct 13:59
acc49ca
Compare
Choose a tag to compare
v1.1.0b1.post1 Pre-release
Pre-release

Identical to v1.1.0b1 except with code for the NioBot.unmount_module function (it was previously an empty method that I literally forgot to add code to)

v1.1.0b1

16 Oct 13:46
626e6a6
Compare
Choose a tag to compare
v1.1.0b1 Pre-release
Pre-release

Major Changes

You should look out for the following things when updating:

  • Converters have been completely rewritten - see the docs
  • The library has (courtesy of @Matthieu-LAURENT39) had a typing rewrite, so you may notice some typing issues with some older code due to changed/added type signatures

Still no 3.12 support!

As aiohttp (and matrix-nio) do not support python 3.12 yet, neither do we. You will receive a build error trying to build from source on python3.12, and wheels are not supplied for 3.12 on PyPi.


Changelog

  • Added some tests to the library
  • Rewrote how argument parsers work (and made them extensible, see docs)
  • Updated matrix-nio to 0.22.0
  • Added the ability to control whether the client's own messages are ignored - this means you can now use commands when running a self bot (running niobot under your own account instead of a dedicated bot account)
  • Added support for typing.Annotated[x, y] argument types
  • Removed Module.log property
  • Deprecated Module.client

Full Changelog: 1.1.0a3...1.1.0b1