Chatto

Latest version: v0.5.0

Safety actively analyzes 688649 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.5.0

Breaking changes

* `Message.type` is now an enum of type `MessageType`
* The `MessageSentEvent` has been removed

Other changes

* Fix some docs issues.

0.4.2

Additions

* Docs!

Breaking changes

Some variable names have changed. See https://github.com/parafoxia/chatto/compare/v0.4.1...v0.4.2 for a full changelog.

0.4.1

Fixed an issue where tokens would not refresh on start-up if the token had expired.

0.4.0

Breaking changes

* `YouTubeBot.token` is now `YouTubeBot.api_key`
* `YouTubeBot.oauth_tokens` is now `YouTubeBot.tokens`

The `YouTubeBot.authorise` method still performs the same task as before, but now works out when to refresh tokens, etc.

Additions

* Token refreshing! Chatto will now refresh your access token both on startup, and while running
* A `ReadyEvent` is now dispatched when the bot is ready to start polling

Fixes

* Failures in sending messages now raise a `chatto.errors.HTTPError`

0.3.0

Major changes

The way the event queue is created has changed. Previously the queue was created at the same time as the event handler itself, but due to weird testing issues Python 3.8 and 3.9, it is now created in the `run` method. You can still access the queue using `bot.events.queue`, but it will now return `None` if the queue doesn't exist.

Minor changes

* The `NoEventQueue` exception has been added
* The `secrets_file` kwarg of the YouTubeBot constructor is now optional

Additions

* Testing for all easily testable aspect of YouTubeBot

0.2.1

This release changes the way `Stream` instances are created.

There is now a single classmethod, `from_data`, which accepts a [video resource](https://developers.google.com/youtube/v3/docs/videos#resource-representation), that can be retrieved from the new staticmethods.

They are similar to the old classmethods, only really with name changes. Both return the video resource data `from_data` expects:

* `Stream.from_id` -> `Stream.fetch_stream_data`
* `Stream.from_channel_id` -> `Stream.fetch_active_stream_data`

This is normally done internally so it doesn't matter too much, but it allowed for better testing, and is more consistent with other classes.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.