rm 404 users from db
тех кого неудалось заразить удаляем
This commit is contained in:
parent
db317cc226
commit
f18a46fe48
1 changed files with 34 additions and 1 deletions
|
@ -425,7 +425,7 @@ async def eb(client, c, conn, con, d, get_id, my_id, message_q):
|
|||
await asyncio.sleep(random.uniform(1, 5))
|
||||
await client.delete_messages(m.chat_id, m.id)
|
||||
|
||||
####################################################################
|
||||
####################################################################
|
||||
|
||||
@client.on(events.NewMessage(pattern='⏱?🚫 Жертва', from_users=(avocado_id,)))
|
||||
async def infection_not_found(event):
|
||||
|
@ -467,3 +467,36 @@ async def eb(client, c, conn, con, d, get_id, my_id, message_q):
|
|||
datetime.timestamp(event.date))
|
||||
logger.warning(
|
||||
'Waiting for infection release... [For skip just bioeb somebody]')
|
||||
|
||||
####################################################################
|
||||
|
||||
@client.on(events.NewMessage(pattern='👺 Юзер не знайдений!'))
|
||||
async def avocado_404(event):
|
||||
m = event.message
|
||||
if m.sender_id == 6333102398:
|
||||
if event.reply_to:
|
||||
reply = await client.get_messages(event.peer_id, ids=event.reply_to.reply_to_msg_id)
|
||||
t= reply.raw_text
|
||||
if reply.entities:
|
||||
t=utils.sanitize_parse_mode('html').unparse(t,reply.entities)
|
||||
r= re.findall(r'([0-9]{6,10})',t)
|
||||
if r:
|
||||
id=int(r[0])
|
||||
if db_pymysql:
|
||||
try:
|
||||
con.query(f"DELETE FROM `tg_bio_attack` WHERE `user_id` = {id};");
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
con.query(f"DELETE FROM `tg_bio_users` WHERE `user_id` = {id};"); #
|
||||
except:
|
||||
pass
|
||||
if db_sqlite3:
|
||||
try:
|
||||
c.execute("DELETE FROM avocado WHERE user_id = %d" % int(id));
|
||||
conn.commit() # rm 404 id
|
||||
except Exception as Err:
|
||||
print(f'err: {Err} in DELETE FROM avocado WHERE `user_id` = {id}')
|
||||
|
||||
####################################################################
|
||||
|
||||
|
|
Loading…
Reference in a new issue