Untitled
unknown
plain_text
3 years ago
1.2 kB
10
Indexable
import telebot
from pyrogram import Client
import time
from pyrogram.enums import ChatMembersFilter
token = "I"
api_id = ""
api_hash = ''
telefon = '+'
grup_ismi = -1001317990474
kelime_listesi = ['trade','forex'] #hepsi küçük harf olmalı
print('Session Bağlantısı Bekleniyor.')
bot = telebot.TeleBot(token)
app = Client(telefon, api_id, api_hash)
app.connect()
bot_id = (bot.get_me()).id
status_option = input('Son Görülmesi Uzun Zaman Önce Olanlar Dahil Edilsin Mi? (e/h):')
bot_secenek = input('Banlist.txt Dosyasındaki Kişilerin Gruptan Atılması için Enter basınız:')
file = open('banlist.txt','r',encoding='utf-8')
bilgiler = file.readlines()
file.close()
for i in bilgiler :
if i != '' :
chat_id = i.split('Chat ID:')[1].replace('\n','')
a =bot.kick_chat_member(grup_ismi,int(chat_id))
file = open('banlist.txt','w')
file.close()
print('Üyeler Gruptan Atıldı. Mesajlar Silinecek.')
for i in (app.get_chat_history(grup_ismi)) :
try:
if str(i.from_user.id) == str(bot_id) :
message_id = i.id
bot.delete_message(grup_ismi,message_id)
except :
pass
Editor is loading...