/amino.py

Multifunctional library for amino in python

Primary LanguagePythonMIT LicenseMIT

GitHub release licence pypi docs

Sponsor project
Installation

Git

pip install git+https://github.com/xXxCLOTIxXx/amino.py.git

pypi

pip install amino.api.py

Library for working with aminoapps servers, below you will see code examples, for more examples see the documentation or the examples folder

Login example

import amino

client = amino.Client()
client.login(email='email', password='password')

Ping pong bot

import amino

client = amino.Client()
client.login(email='email', password='password')
print(f"LOGIN: OK.")


@client.event(amino.arguments.wsEvent.on_text_message)
def text_msg(data: amino.objects.Event):
    if data.comId is None or data.message.author.uid == client.userId: return
    print(f"New message: {data.message.content}")
    try:
        com_client = amino.CommunityClient(client.profile, data.comId)
        if data.message.content.lower().split(" ")[0] == "ping":
            com_client.send_message(data.message.threadId, "Pong!", replyTo=data.message.messageId)
        elif data.message.content.lower().split(" ")[0] == "pong":
            com_client.send_message(data.message.threadId, "Ping!", replyTo=data.message.messageId)
    except Exception as e:
        print(e)

=Read the documentation