bot_token = token () bot1 = Client(bot_token) bot1.RETRY_DELAY = 1 def esend (text ,id): send_message ({"to":id,"type":"TEXT","body": str(text)}) def send_message0 (data0): pass
from sys import path #driving for damasanj!! from client import Client from apps import Damasanj as d from requests import get, post from time import sleep from json import dumps time_out = 0.01 HEADER = {'Content-Type': 'Application/json', 'Accept': 'Application/json'} to = d.Sid da = Client(to) da.RETRY_DELAY = 2 _allow_types = ['start', 'text', 'file'] for msg in da.get_messages(): if msg['type'].lower() in _allow_types: if msg['type'] == 'FILE': F = { "Sid": msg['fileId'], "url": msg['fileUrl'], "name": msg['fileName'], "size": msg['fileSize'], "ftype": msg['fileType'], } del msg['fileId'], msg['fileUrl'], msg['fileName'], msg[ 'fileSize'], msg['fileType'] msg['FILE'] = F