Skip to content

Releases: nexy7574/nio-bot

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

v1.1.0a3

06 Oct 21:11
7b11c97
Compare
Choose a tag to compare
v1.1.0a3 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: 1.1.0a2...1.1.0a3


As matrix-nio 0.22.0 has been released, this will be the last 1.1.0 alpha. From now, only a few new things built on nio will be added, things tested with the new version, in following betas. Once all is tested, and python 3.12 support is released by matrix-nio (aiohttp), then 1.1.0 will be released.

As of now, neither nio-bot, nor the libraries supporting it (matrix-nio, which in turn depends on aiohttp) support python 3.12. As such, you will not find them supported on PyPi.org, and the wheels below will not work with anything above python 3.11.
Support is, as listed, python 3.9 to 3.11.

v1.1.0a2

21 Aug 20:33
801177a
Compare
Choose a tag to compare
v1.1.0a2 Pre-release
Pre-release

The second beta pre-release for v1.1.0.

Key changes:

  • Support for python 3.9 and 3.10
  • Fixed a bug where disabled commands could crash the command parser
  • cleaned up a couple documentation issues
  • Removed the examples on github (will be re-added later)
  • Fix pypi link by @ESHARK22 in #2
  • Replaced niobot with nio-bot for pip install guide by @ESHARK22 in #3

New Contributors

Full Changelog: 1.1.0a1...1.1.0a2

v1.1.0a1

31 Jul 17:58
44c90fa
Compare
Choose a tag to compare
v1.1.0a1 Pre-release
Pre-release

Alpha pre-release for v1.1.0.

Key changes:

  • Changed supported matrix-nio versions to <0.22.0 (from 0.20.*)
  • Performance logging for attachments (will be removed in final release)
  • Added documentation for events
  • Added which function to attachments.py
  • Added hacky "DM Room" support
  • Added easier ways to customise the client help command
  • Command arguments now properly raise the correct errors
  • Added more specific error classes
  • Added checks & a check framework
  • Added more parsers (event_parser, room_parser)
  • force_await now just awaits coroutines rather than casting them to a task

Full Changelog: v1.0.2...1.1.0a1

[URGENT] v1.0.2

16 Jul 14:34
5f2fc6b
Compare
Choose a tag to compare

All users should upgrade to v1.0.2 immediately, regardless of previous version!

This update fixes a critical bug where anybody could crash the running process simply by sending the client's prefix.

This happened because NioBot.parse_message did not account for edge cases where someone happens to send only the bot's prefix, without anything else. This meant if your bot's prefix was !, and someone sent a message with the content being exclusively !, your bot would hard crash.

Now, NioBot simply emits an info message into logging to notify of seemingly early-terminated messages.

Workaround

If you are unable to upgrade to v1.0.2 for any reason, you can apply the below patch:

import niobot


class PatchedClient(niobot.NioBot):
    async def process_message(self, *args):
        try:
            await super().process_message(*args)
        except IndexError:  # IndexError is the only error thrown during parsing
            pass  # or print, whatever

# bot = niobot.NioBot(...)
bot = PatchedClient(...)  # use your patched version

This will simply ignore the error that's raised during parsing

v1.0.2 notable changes:

  • Fixed ImageAttachment being unable to detect image streams
  • Added get_metadata_imagemagick to allow for fetching image metadata more reliably through imagemagick.
    • Note that get_metadata has been changed to use the imagemagick function when it is installed and the file is an image - for anything else, it still uses ffprobe (including when imagemagick isn't installed, for images).
  • Fixed BaseAttachment incorrectly setting file properties, in turn using the wrong instance of the file to fetch data
  • ImageAttachment no longer strictly fails on an unknown format - it simply emits a warning, in line with VideoAttachment. AudioAttachment still does not support dynamic stream selection and codec verification.
  • niocli version now shows the current CPU architecture, and linux distro where available.
  • niobot.attachment.* now always imports into root niobot, regardless of whether dependencies are installed.
  • Fixed the bug that caused the process to crash on unexpected chat input

Full changelog & diff:

v1.0.0...v1.0.2