Aminoacid

Latest version: v0.1.5

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

Scan your dependencies

0.1.5

in `__init__.py`:
- make `Bot.command()` return an instance of the registered `UserCommand`
- remove unused *args and **kwargs in `Bot.event()`
- add error handling in `Bot.handle_command()`

in `_socket.py`:
- make the socket connect to either ws1, ws2 etc. to avoid socket dying

in `abc.py`:
- add `Blog`
- add `fetch_blogs()` method to `Member`

in `client.py`:
- add `fetch_blogs()` method
- add `tip()` method

in `exceptions.py`:
- raise exception instead of logging to give error handling a use

in `util/__init__.py`:
- bump version

in `util/commands.py`:
- add error handling

in `util/events.py`:
- only import if type checking to avoid circular imports

in `examples/notifications.py`:
- file created

in `examples/simple_bot.py`:
- in `hi()` `ctx.send()` -> `ctx.reply()`
- add `claim()` command
- add error handling example

**Full Changelog**: https://github.com/okok7711/AminoAcid/compare/v0.1.4...v0.1.5

0.1.4

in `__init__.py`:
- add docstring to `json_serialize()`
- make `help_command` keyword only in `Bot.__init__()`
- set device pushToken in `Bot.main_loop()` to get notifications
- add `cooldown` param to `Bot.command()` func
- Fix docstring in `Bot.command()`
- remove unused `**kwargs` in `Bot.run`
- only handle command if there wasn't an error in executing in `Bot.handle_command()`
- add `token` attr to `HttpClient` to have unique pushTokens in the lib to fix notifications

in `_socket.py`:
- add `handle_notification()` to handle notif events
- fix `SocketClient.handle_notification()` by using `Enum.value` instead of Enum type
- add `SocketClient.handle_livelayer()`
- send MESSAGE_ACK in response to message in `SocketClient.sock_conn()`
- log sent socket messages and generate ids for sent messages

in `abc.py`:
- modify the `AminoBaseClass.__repr__()` to strip rightmost ", "
- add `self` arg to `Thread.send()`
- add `Community` object (not finished)
- add `Notification.type`
- fix `Notification.from_dict()` to use `self.payload` instead of the `data` arg
- init super in `Context`
- Add `Bubble` class
- make `Session.deserialize_session()` a staticmethod

in `client.py`:
- make `ApiClient` subsclass of `AminoBaseClass` instead of `ABC`
- return exceptions instead of letting the program fail when requests fail
- fix `ApiClient.start_dm()`
- add `ApiClient.set_device()`
- add `ApiClient.fetch_communities()`
- use `HttpClient.token` instead of constant pushToken

in `util/__init__.py`:
- add `parse_topic()` to parse topic strings
- bump version

in `util/commands.py`:
- remove `require_positional` arg to `UserCommand.__init__()` due to not being used
- add cooldown arg to `UserCommand.__init__()` to implement Time between each command call https://github.com/okok7711/AminoAcid/issues/1
- merge `UserCommand.__call__()` with `UserCommand.__await__()`

in `util/enums.py`:
- add `NotifTypes` enum
- add `Topics` enum
- Add `SocketCodes.MESSAGE_ACK`
- Add docstrings

in `util/events.py`:
- document `on_vc_start()` and `on_vc_invite()`
- add placeholder events for livelayer events
- log events that are unhandled in `empty_cb()` with INFO level

in `examples/dice_bot.py`:
- make it actually roll a dice.

What's Changed
* v0.1.4 - Cooldowns & Livelayer by okok7711 in https://github.com/okok7711/AminoAcid/pull/3

**Full Changelog**: https://github.com/okok7711/AminoAcid/compare/v0.1.2...v0.1.4

0.1.2

in `__init__.py`:
- add attr `socket` to `aminoacid.Bot`
- change `Bot.log_request()` to be a coro to log response body

in `_socket.py`:
- Except `ClientConnectorErrorr` to reconnect if needed
- add `empty_cb()` to be triggered in case of no `on_message()` event
- add `on_notification()` event
- log unknown socket messages
- add `SocketClient.send()` to send messages
- add `SocketClient.subscribe()` to subscribe to topics in order to receive messages and notifications
- add`SocketClient.unsubscribe()` to unsub from topics

in `abc.py`:
- remove `overload`-ed `MessageAble.send()` to opt for an `isinstance()` approach
- finish messaging user in `MessageAble.send()`
- implement `Context.reply()`
- implement `User.send()` and `User.get()`
- change `Message.createdTime` from str to int, automatically parsed by `util.str_to_ts()`
- fix `Thread.send()`
- add `abc.Embed`
- add `abc.linkSnippet`
- add `abc.Notification`

in `client.py`:
- implement sending embeds in `ApiClient.send_message()`
- add `ApiClient.start_dm()`
- add`ApiClient.message_user()`
- add `ApiClient.upload_image()`

in `util/__init__.py`:
- remove `Content-Type` from `head` in `geat_headers()`
- bump version
- add `str_to_ts()` to convert amino timestamps to UNIX timestamps

in `util/commands.py`:
- add docstring to `UserCommand`
- change docstring of `UserCommand.__init__()`
- use `bool()` instead of if-/else in `UserCommand.get_signature()`
- change the way positional arguments are handled in `UserCommand.get_signature()`
- change list comprehension to generator expression in `UserCommand.__await__()`

in `util/enums.py`:
- finish `SocketCodes`

in `util/events.py`:
- add placeholder event handlers for documentation

**Full Changelog**: https://github.com/okok7711/AminoAcid/compare/v0.1.1...v0.1.2

0.1.1

- `ApiClient.login()` now actually returns a filled `User` object
- `abc.Session` was added and is now used in `HttpClient`
- `deserialize_session` was moved to `abc.Session`
- moved `Message.get()` out of `Message._from_dict()`
- implemented `Message.get()`
- implemented `ApiClient.fetch_message()`
- changed command signature (`UserCommand.get_signature()`) to be POSIX-like
- add `CommandExists` and `CheckFailed`
- `MessageAble` now inherits from `AminoBaseClass`
- removed `print()` statements in favor of logging
- added checks so that the bot doesnt trigger commands
- moved `on_ready()` callback to `SocketClient.run()`
- use `logger.exception()` instead of raising and exciting
- add `workflow_dispatch` to codeql
- add new example
- update old example

**Full Changelog**: https://github.com/okok7711/AminoAcid/compare/v0.1.0...v0.1.1

0.1.0

First release of AminoAcid
**Full Changelog**: https://github.com/okok7711/AminoAcid/commits/v0.1.0

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.