# Настройка логирования
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger()
API_TOKEN = '' #<-- Token
bot = Bot(token=API_TOKEN)
dp = Dispatcher()
# Регистрация роутера
router = Router()
dp.include_router(router)
message_link_pattern = re.compile(r'
https://t.me/([^/]+)/(\d+) ')
ADMIN_ID =
LOG_CHANNEL_ID = -1000000000000 # Замените на ID вашей приватной группы
def load_accounts(filename='accounts.txt'):
accounts = []
with open(filename, 'r') as file:
for line in file:
api_id, api_hash, session_name = line.strip().split(':')
accounts.append({
'api_id': api_id,
'api_hash': api_hash,
'session_name': session_name
})