Answer the question
In order to leave comments, you need to log in
How can a user add a pyrogram bot to a channel?
How do I add a bot user to a channel, I read the join_chat() documentation, but I can't do it.
from pyrogram import Client, filters
from os import listdir
import os
a=listdir('PH_videos')
PH=[]
for i in a:
if i.endswith('.mp4'):
PH.append(i)
app = Client("my_account")
with app:
app.join_chat('https://t.me/redendertestpy')
num=0
while True:
app.send_video("me", r"C:\Users\Rasul\Desktop\PH_Poster\PH_videos\\"+PH[num])
num=num+1
app.run()
Answer the question
In order to leave comments, you need to log in
You need to pass either an invitation link or just the username of the chat to the join_chat method. And in your code, just a link to the chat is passed.
That is, you need without https://t.me/
Carefully review the examples from the documentation
app.join_chat('edendertestpy')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question