Пример #1
0
    def reply_message():

        subclient = amino.SubClient(comId=data.comId,
                                    profile=clienteAmino.profile)
        mensaje = data.message.content
        command = mensaje.split(' ')
        tmp = command[1:]
        command = command[0]
        reply = data.json
        lenguaje = clienteAmino.get_community_info(
            comId=data.comId).primaryLanguage

        extension = reply["chatMessage"]["extensions"]
        replyToMessage = extension.get('replyMessageId', None)
        replyMessage = extension.get('replyMessage', None)

        if replyToMessage is not None or replyMessage is not None:
            params = parametros(tmp)
            args = ravnin(data, subclient, params)
            idioma = funcionesAcciones.idiomaTrivia(lenguaje=lenguaje)

            if data.message.author.userId in admins:
                if command in funcionesMensajes.responder_acciones:
                    media = replyMessage["mediaValue"]
                    funcionesMensajes.responder_acciones[command](
                        args=args,
                        media=media,
                        replyToMessage=replyToMessage,
                        admins=admins)
            if re.search("—可 Quizz", str(replyMessage)):
                funcionesMensajes.trivia(args, replyMessage, idioma, mensaje)
Пример #2
0
def send_msg(msg):
    subclient = amino.SubClient(
        comId=selectedchatids[:selectedchatids.find(":::")],
        profile=client.profile)
    subclient.send_message(message=msg,
                           chatId=selectedchatids[selectedchatids.find(":::") +
                                                  3:])
Пример #3
0
    def admin_message():
        global activo
        subclient = amino.SubClient(comId=data.comId,
                                    profile=clienteAmino.profile)
        mensaje = data.message.content
        chatId = data.message.chatId
        command = mensaje.split(' ')
        command = command[0]

        if data.message.author.userId in admins:
            if command == "-off":

                activo = False
                message_on = {'chatId': chatId, 'message': "¡Bot apagado!"}
                subclient.send_message(**message_on)

            elif activo is False:

                if command == "-on":

                    activo = True
                    message_on = {'chatId': chatId, 'message': "Bot activado"}
                    subclient.send_message(**message_on)

                if command in funcionesAcciones.acciones:

                    message_none = {
                        'chatId':
                        chatId,
                        'message':
                        "Bot en actualización, ¡Ningún comando funcionará!"
                    }
                    subclient.send_message(**message_none)
Пример #4
0
def on_group_member_leave(data):
    sub = amino.SubClient(comId=data.comId, profile=clienteAmino.profile)
    if data.message.author.userId not in content.lista_negra:
        mensaje = {
            'message': f"{content.leave}",
            'chatId': data.message.chatId
        }
        sub.send_message(**mensaje)
Пример #5
0
    def commandos():
        subclient = amino.SubClient(comId=data.comId,
                                    profile=clienteAmino.profile)
        message = {'chatId': data.message.chatId}
        mensaje = data.message.content
        command = mensaje.split(' ')
        tmp = command[1:]
        command = command[0]
        comandoParametro = parametros(tmp)
        lenguaje = clienteAmino.get_community_info(
            comId=data.comId).primaryLanguage

        if activo is True:
            if command in funcionesAcciones.acciones:
                try:

                    if data.message.author.userId not in content.lista_negra:
                        params = parametros(tmp)
                        if params == "":
                            params = None
                        args = ravnin(data, subclient, params)
                        funcionesAcciones.acciones[command](args, lenguaje)
                    else:
                        message.update({
                            'message':
                            "¡Usaste mal mis comandos y tienes el descaro de volver a usarlos! -n-"
                        })
                        subclient.send_message(**message)

                except Exception as Error:
                    print(Error)
                    message.update({
                        'message':
                        "¡Cargando comandos, funciones, listas y clases en Ravnin... ¡1s! ... Intenta ejecutar nuevamente este comando."
                    })
                    subclient.send_message(**message)

            elif command == "-help":

                comandoParametro = parametros(tmp)
                if (comandoParametro in funcionesAcciones.acciones) or (
                        comandoParametro
                        in funcionesMensajes.responder_acciones) or (
                            comandoParametro
                            in funcionesAcciones.categoriasComandos):
                    funcionesAcciones.mostrarAyuda(message, comandoParametro)
                    subclient.send_message(**message)
                else:
                    try:
                        message.update({'message': content.mensajeAyuda})
                        subclient.send_message(**message)
                    except Exception:
                        message.update({
                            'message':
                            "¡Cargando comandos, funciones, listas y clases en Ravnin... ¡1s! ... Intenta ejecutar nuevamente este comando."
                        })
                        subclient.send_message(**message)
Пример #6
0
def on_group_member_join(data):
    sub = amino.SubClient(comId=data.comId, profile=clienteAmino.profile)
    if data.message.author.userId not in content.lista_negra:
        mensaje = {
            'message': f"{content.join}",
            'embedTitle': data.message.author.nickname,
            'chatId': data.message.chatId,
            'embedImage': upload(data.message.author.icon)
        }
        sub.send_message(**mensaje)
Пример #7
0
 def txtshow(self):
     global selectedchatids, chatbx, chatcnv
     chatbx.selfreset()
     selectedchatids = str(chatids[self.txt])
     subclient = amino.SubClient(
         comId=selectedchatids[:selectedchatids.find(":::")],
         profile=client.profile)
     chatmsg = subclient.get_chat_messages(
         chatId=selectedchatids[selectedchatids.find(":::") + 3:], size=25)
     for message, author in zip(chatmsg.content, chatmsg.author.nickname):
         chatbx.AddNew(messagename=author, messagecontent=message)
Пример #8
0
 def set_online_status(self, account: dict):
     email = account.get("email")
     client = login_sid(account)
     if not client:
         return
     sub_client = amino.SubClient(comId=self.com_id, client=client)
     try:
         sub_client.activity_status("on")
         service_log(email, "Online status is set")
     except amino.exceptions.YouAreBanned:
         service_log(email, "You are banned")
     except Exception as e:
         service_log(email, str(e))
Пример #9
0
 def wall_comment(self, userid: str, text: str, account: dict):
     email = account.get("email")
     client = login_sid(account)
     if not client:
         return
     sub_client = amino.SubClient(comId=self.com_id, client=client)
     try:
         sub_client.comment(message=text, userId=userid)
         service_log(email, "Comment sent")
     except amino.exceptions.YouAreBanned:
         service_log(email, "You are banned")
     except Exception as e:
         service_log(email, str(e))
Пример #10
0
 def vote_poll(self, blog_id: str, option_id: str, account: dict):
     email = account.get("email")
     client = login_sid(account)
     if not client:
         return
     sub_client = amino.SubClient(comId=self.com_id, client=client)
     try:
         sub_client.vote_poll(blogId=blog_id, optionId=option_id)
         service_log(email, "Voted")
     except amino.exceptions.YouAreBanned:
         service_log(email, "You are banned")
     except Exception as e:
         service_log(email, str(e))
Пример #11
0
 def leave_bots_from_chat(self, object_id, account: dict):
     email = account.get("email")
     client = login_sid(account)
     if not client:
         return
     sub_client = amino.SubClient(comId=self.com_id, client=client)
     try:
         sub_client.leave_chat(chatId=object_id)
         service_log(email, "Leave")
     except amino.exceptions.YouAreBanned:
         service_log(email, "You are banned")
     except amino.exceptions.RemovedFromChat:
         service_log(email, "You are removed from this chatroom")
     except Exception as e:
         service_log(email, str(e))
Пример #12
0
 def change_nick_random(self, max_length, nick, account: dict):
     email = account.get("email")
     client = login_sid(account)
     if not client:
         return
     sub_client = amino.SubClient(comId=self.com_id, client=client)
     try:
         if nick is None:
             nick = UsernameGenerator(2, max_length).generate()
         sub_client.edit_profile(nickname=nick)
         service_log(email, f"Nickname changed to {nick}")
     except amino.exceptions.YouAreBanned:
         service_log(email, "You are banned")
     except Exception as e:
         service_log(email, str(e))
Пример #13
0
 def unfollow(self, object_id, account: dict):
     email = account.get("email")
     client = login_sid(account)
     if not client:
         return
     sub_client = amino.SubClient(comId=self.com_id, client=client)
     try:
         sub_client.unfollow(userId=object_id)
         service_log(email, "Unfollow")
     except amino.exceptions.YouAreBanned:
         service_log(email, "You are banned")
     except amino.exceptions.AccessDenied:
         service_log(email, "Access denied")
     except Exception as e:
         service_log(email, str(e))
Пример #14
0
 def start_chat(self, object_id, account: dict):
     email = account.get("email")
     client = login_sid(account)
     if not client:
         return
     sub_client = amino.SubClient(comId=self.com_id, client=client)
     try:
         sub_client.start_chat(userId=object_id, message="")
         service_log(email, "Started chat")
     except amino.exceptions.YouAreBanned:
         service_log(email, "You are banned")
     except amino.exceptions.AccessDenied:
         service_log(email, "Access denied")
     except Exception as e:
         service_log(email, str(e))
Пример #15
0
def listchats():
    global cnv, canvas, gui, expconbtn, chatbx, x, chatcnv
    expconbtn = Button(gui, text=">>", command=exp_con)
    expconbtn.place(x=420, y=45)
    gui.update()
    canvas = Canvas(cnv, width=180, height=225)
    scrollbar = ttk.Scrollbar(cnv, orient="vertical", command=canvas.yview)
    cnv.scrollable_frame = ttk.Frame(canvas)

    cnv.scrollable_frame.bind(
        "<Configure>",
        lambda e: canvas.configure(scrollregion=canvas.bbox("all")))
    canvas.create_window((0, 0), window=cnv.scrollable_frame)

    canvas.configure(yscrollcommand=scrollbar.set)

    canvas.pack(side="left", expand=True)
    scrollbar.pack(side="right", fill="y")

    subclients = client.sub_clients()
    try:
        for name, id in zip(subclients.name, subclients.comId):
            try:
                comcheck = cleanse_word(name)
                curcomid = id
                ttk.Label(cnv.scrollable_frame, text=comcheck).pack()
                subclient = amino.SubClient(comId=str(id),
                                            profile=client.profile)
                chats = subclient.get_chat_threads()
                gui.update()
            except:
                None
            for name, id in zip(chats.title, chats.chatId):
                try:
                    wrdcheck = cleanse_word(name)
                    c = chatnamebtn(parent=cnv.scrollable_frame, txt=wrdcheck)
                    tempid = str(curcomid) + ":::" + str(id)
                    chatids[wrdcheck] = tempid
                    gui.update()
                except:
                    None
    except:
        None
    gui.update()
    while x != 2:
        if x == 3:
            x = 2
        continue
Пример #16
0
def agin():
	coins=input ("Coins: ")
	subclient = amino.SubClient(comId=comId, profile=client.profile)
	try:
		subclient.send_coins(chatId=chatId,coins=coins,transactionId=tran)
		print ("Done Sending")
	except:
		print ("Faild Sending")
	print ("Agin?")
	print ("[1] Yes")
	print ("[2] No")
	u=input("choose: ")
	if u== db_1:
		agin()
	elif u== db_2:
		os._exit(1)
Пример #17
0
 def like_blog(self, object_id, account: dict):
     email = account.get("email")
     client = login_sid(account)
     if not client:
         return
     sub_client = amino.SubClient(comId=self.com_id, client=client)
     try:
         sub_client.like_blog(blogId=object_id)
         service_log(email, "Like")
     except amino.exceptions.RequestedNoLongerExists:
         sub_client.like_blog(wikiId=object_id)
         service_log(email, "Like")
     except amino.exceptions.YouAreBanned:
         service_log(email, "You are banned")
     except Exception as e:
         service_log(email, str(e))
Пример #18
0
 def play_lottery(self, account: dict):
     email = account.get("email")
     client = login_sid(account)
     if not client:
         return
     sub_client = amino.SubClient(comId=self.com_id, client=client)
     try:
         play = sub_client.lottery()
         award = play.awardValue if play.awardValue else 0
         service_log(email, f"+{award} coins won")
         return int(award)
     except amino.exceptions.AlreadyPlayedLottery:
         service_log(email, "AlreadyPlayedLottery")
     except amino.exceptions.YouAreBanned:
         service_log(email, "You are banned")
     except Exception as e:
         service_log(email, str(e))
Пример #19
0
 def change_icon_random(self, images: list, account: dict):
     email = account.get("email")
     client = login_sid(account)
     if not client:
         return
     sub_client = amino.SubClient(comId=self.com_id, client=client)
     try:
         icon = client.upload_media(
             open(
                 os.path.join(os.getcwd(), "src", "icons",
                              f"{random.choice(images)}"), "rb"), "image")
         sub_client.edit_profile(icon=icon)
         service_log(email, "Icon changed")
     except amino.exceptions.YouAreBanned:
         service_log(email, "You are banned")
     except Exception as e:
         service_log(email, str(e))
Пример #20
0
def on_chat_tiip(data):
    try:
        subClient = amino.SubClient(comId=data.comId,
                                    profile=clienteAmino.profile)
    except Exception:
        return

    raw_data = data.json
    coins = raw_data['chatMessage']['extensions']['tippingCoins']
    mensaje = {
        'message': "[C]¡Muchas gracias! nwn",
        'embedTitle': data.message.author.nickname,
        'chatId': data.message.chatId,
        'embedImage': upload(data.message.author.icon),
        'embedLink': "ndc://user-profile/data.message.author.userId",
        'embedContent': f"Coins donadas: {coins} ♡"
    }
    subClient.send_message(**mensaje)
Пример #21
0
 def send_message(self, object_id, text, account: dict):
     email = account.get("email")
     client = login_sid(account)
     if not client:
         return
     sub_client = amino.SubClient(comId=self.com_id, client=client)
     try:
         sub_client.send_message(chatId=object_id, message=text)
         service_log(email, "Send")
     except amino.exceptions.YouAreBanned:
         service_log(email, "You are banned")
     except amino.exceptions.RemovedFromChat:
         service_log(email, "You are removed from this chatroom")
     except amino.exceptions.ChatViewOnly:
         service_log(email, "Chat in view only mode")
     except amino.exceptions.AccessDenied:
         service_log(email, "Access denied")
     except Exception as e:
         service_log(email, str(e))
Пример #22
0
    def __init__(self):
        accounts = json.load(
            open(os.path.join(os.getcwd(), "src", "auth", "data.json"), "r"))
        email = None
        password = None
        if accounts:
            print("Accounts:")
            for x, account in enumerate(accounts, 1):
                print(f"{x}. {account.get('email')}")
            choice = input("\nEnter \"+\" to add account\n>>> ")
            if choice == "+":
                email = input("Email: ")
                password = input("Password: "******"email": email, "password": password})
            else:
                index = int(choice) - 1
                email = accounts[index].get("email")
                password = accounts[index].get("password")
        if not accounts:
            email = input("Email: ")
            password = input("Password: "******"email": email, "password": password})

        self.client = login({"email": email, "password": password})
        if not self.client:
            print(colored("Failed login", "red"))
            exit(0)
        logger.debug(f"Login ({email}:{password})")
        print(colored("Login was successful!", "green"))

        subs = self.client.sub_clients(start=0, size=100)
        for x, com_name in enumerate(subs.name, 1):
            print(f"{x}. {com_name}")
        self.sub_client = amino.SubClient(
            comId=subs.comId[int(input("Enter community number: ")) - 1],
            client=self.client)
        logger.debug(f"Community {self.sub_client.comId}")

        self.single_management = SingleManagement(self.sub_client)
        self.bot_management = BotManagement(self.sub_client)
        self.chat_moderation = ChatModeration(self.sub_client)
        self.badass = Badass(self.sub_client)
Пример #23
0
 def send_coins(self, object_id, account: dict):
     email = account.get("email")
     client = login_sid(account)
     if not client:
         return
     sub_client = amino.SubClient(comId=self.com_id, client=client)
     try:
         coins = int(client.get_wallet_info().totalCoins)
         if coins != 0:
             sub_client.send_coins(coins=coins, blogId=object_id)
             service_log(email, f"+{coins} coins")
             return coins
         else:
             service_log(email, "NotEnoughCoins")
     except amino.exceptions.NotEnoughCoins:
         service_log(email, "NotEnoughCoins")
     except amino.exceptions.InvalidRequest:
         service_log(email, "InvalidRequest")
     except amino.exceptions.YouAreBanned:
         service_log(email, "You are banned")
     except Exception as e:
         service_log(email, str(e))
Пример #24
0
import amino
import aminos
client = aminos.ClientSid()
#تسجيل
print("By Bovonos")

print("Git Hub: https://github.com/Bovonos0")

sid = input("sid: ")

client.sssid(sid=sid)

#رابط المنتدى

comlink = input("Community Link: ")

cominfo = client.get_from_code(comlink)
comId = cominfo.path[1:cominfo.path.index('/')]

subclient = amino.SubClient(comId=comId, profile=client.profile)

clientx = amino.acm.ACM(profile=client.profile, comId=comId)

email = input("Your Email: ")
password = input("Your Password: "******"Done")
Пример #25
0
import time

with open('./config.json') as cjson:
    config = json.load(cjson)
    print("Ficheiro: config.json carregado com sucesso.")

client = amino.Client()

ea = config["email"]
pa = config["passwd"]
comid = config["comuid"]
prefix = config["prefix"]

client.login(ea, pa)

subclient = amino.SubClient(aminoId=comid, profile=client.profile)


@client.callbacks.event("on_text_message")
def on_text_message(data):
    if data.message.content.lower().startswith(f'{prefix}ping'):
        subclient.send_message(message="Pong!", chatId=data.message.chatId)

    if data.message.content.lower().startswith(f'{prefix}perfil'):
        u1 = subclient.get_user_info(data.message.author.userId)
        u2 = u1.nickname
        u3 = u1.createdTime
        u4 = u1.followersCount
        u5 = u1.followingCount
        subclient.send_message(
            message=
Пример #26
0
    for userId in data.profile.userId:
        listusers.append(userId)
    return listusers


email = input("Email/Почта:")
password = input("Password/Пароль:")
msg = input("Message/Сообщение:")
client = amino.Client()
client.login(email=email, password=password)
clients = client.sub_clients(start=0, size=1000)
for x, name in enumerate(clients.name, 1):
    print(f"{x}.{name}")
communityid = clients.comId[
    int(input("Выберите сообщество/Select the community: ")) - 1]
sub_client = amino.SubClient(comId=communityid, profile=client.profile)
users = sub_client.get_online_users(size=1000)
user = advertise(users)
for i in lz:
    if i in user:
        user.remove(i)

print("Sending Advertise")
for _ in range(4000):
    with concurrent.futures.ThreadPoolExecutor(max_workers=40000) as executor:
        _ = [
            executor.submit(sub_client.start_chat, user, msg)
            for userId in user
        ]

print("Sending Advertise 2")
Пример #27
0
import amino
import random

random.seed()
# my code

client = amino.Client()

client.login(email='*****@*****.**', password='******')

subclient = amino.SubClient(comId='131410019', profile=client.profile)

id_chat_test = 'd2946d45-8835-4e01-b886-fadad4357be7'
# TEST
#id_chat_test = 'ec7f1dc8-d418-4873-905b-e1544401dd28'; # 18+


@client.callbacks.event("on_text_message")
def on_text_message(message):
    data_sms = message.message
    if (str(data_sms.chatId) == id_chat_test):
        print(f"{data_sms.author.nickname}: {data_sms.content}")
        us_id = []
        #us_id.append(str(data_sms.author.userId));
        us_id.append(data_sms.author.userId)
        #print("mentionUserIds: "+str(data_sms.mentionUserIds))
        if str(data_sms.author.nickname) != "Karapass":
            subclient.send_message(data_sms.chatId,
                                   "@добрий день\nПідори",
                                   replyTo=data_sms.messageId)
Пример #28
0
import amino
import json
import time
#comm id: 195512655
#Official Overlord Chatroom  :  42019ba1-1907-468f-b1d6-608cdad01a4e
#Cult of Ra! Donations are welcome!  :  69b9a155-17db-4094-a158-486487821605
email="*****@*****.**"
password="******"
chatid = "7eb7e6ea-534c-4ce2-b527-1fa329a69b11"
client=amino.Client()
client.login(email,password)
print("logged in...")
subclient = amino.SubClient(comId='195512655', profile=client.profile)
print("joined...")
#chats = subclient.get_public_chat_threads(size=100)
#########################################################################################
def countdown(t): 
    
    while t: 
        mins, secs = divmod(t, 60) 
        timer = '{:02d}:{:02d}'.format(mins, secs) 
        print(timer, end="\r") 
        time.sleep(1) 
        t -= 1

  
############################################################################################
welc ='''

࿇Welcome to Overlord amino!࿇
Пример #29
0
### Bot Amino Naomi version 0.6 by Akihiko Ken
import amino
import random
import datetime
from gtts import gTTS
import nekos
import requests
import os

client = amino.Client()
client.login(email="secret",
             password="******")  #вводим пароль и почту от аккаунта бота
sub_client = amino.SubClient(
    comId='secret', profile=client.profile
)  #вместо "id" введите айди сообщества, в котором будет работать чат
ban = 0
tim = 1
hm = [0]
av = []
nom = 0


def on_message(data):
    global ban
    global tim
    global nom
    chatId = data.message.chatId
    nickname = data.message.author.nickname
    content = data.message.content
    vrem = data.message.createdTime[17:19]
    id = data.message.messageId
Пример #30
0
import amino

client = amino.Client()
client.login(email='YOUR EMAIL', password='******')
subclient = amino.SubClient(comId='COMMUNITY ID', profile=client.profile)

chats = subclient.get_chat_threads()
for chatName, chatId in zip(chats.title, chats.chatId):
    print(chatName, chatId)