Library for creating amino bots and scripts.
Project description
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
amino.py.api-0.4.7.tar.gz
(45.1 kB
view hashes)
Built Distribution
Close
Hashes for amino.py.api-0.4.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd33cafaf338d85cefd74e9b770849584621dcd3c963252c3c76ac18e7e53526 |
|
MD5 | 6be7a9337b6412be345d3dcf2db70162 |
|
BLAKE2b-256 | 44f83fe00a866bfacdb29c47b29bd313445535927b64b629cde3e30a85ff7891 |