Official Telethon's chat! Rules: • Speak English • Stay on topic (questions about Telethon) • Be respectful • Don't ask to ask • Spam-related uses lead to ban • Read https://docs.telethon.dev before asking things here Read more about us @TelethonUpdates
Hi and welcome to the group. Before asking any questions, please read the rules from the group's description, and don't forget to read the docs. Make sure you are using the latest version with pip3 install -U telethon
, since most problems have already been fixed in newer versions.
Man this is the code and my purpose is creating a group and making it visible
Читать полностью…download module files from GitHub and feel free to edit
Читать полностью…Do you know what things do I need to change in the code or the module?
Читать полностью…this issue is not related to telethon and it's issue in module or in code (as long your code don't violate tos)
Читать полностью…How to change a group to super group using migrateChatRequest and also making a group history visible ? With that one id, chat_id = u.participants.chat_id
Читать полностью…Printing result shows me this
InvitedUsers(Читать полностью…
updates=Updates(
updates=[
.
.
.],
users=[User(id....
),User(id...
)],
chats=[Chats(id = ***,.....))],
...
^exec async
async def CreateChannel(client, title='Aayco', about=None, group=False):
if about is None:
about = str(datetime.now())
try:
result = await client(functions.channels.CreateChannelRequest(
title=title,
about=about,
megagroup=group
))
return True, result.chats[0].id
except:
return False, None
result,chat_id = await CreateChannel(client)
print(chat_id if result else 'Error')
Same thing i did and try to get the id, through print .it shows me the full thing of the group including users but i am unable to call the group id
Читать полностью…How to show and purchase this one?
And can i sort them by price or something like that ?
await client.start()Читать полностью…
result = await client(functions.messages.CreateChatRequest(
users=['maths_war_bot'],
title='my awesome title'
))
for u in result.updates.updates:
if isinstance(u,UpdateChatParticipants):
chat_id2 = u.participants.chat_id
group = client.get_entity(chat_id)
migrated = client(functions.messages.MigrateChatRequest(
chat_id=chat_id2
))
result2 = client(functions.channels.TogglePreHistoryHiddenRequest(
channel="-100"+str(chat_id2),
enabled=False
))
module convert it to int automatically but it should be passed as int
Читать полностью…Migrate = client(MigrateChatRequest(
chat_id = str(chat_id))
?
Hello, has anyone met a problem with freezing acc after starting? If so please react
Читать полностью…Executed Code 👑
from telethon.tl.functions.messages import CreateChatRequest
from telethon.tl.types import UpdateChatParticipants
async def CreateChat(client, title='Aayco', user_ids=None):
if user_ids is None:
user_ids = ['unlowly', 'ikilwa']
try:
result = await client(CreateChatRequest(users=user_ids, title=title))
for u in result.updates.updates:
if isinstance(u, UpdateChatParticipants):
return True, u.participants.chat_id
return True, None
except:
return False, None
result, chat_id = await CreateChat(client)
print(chat_id if result and chat_id else 'Error')
4713863998Читать полностью…
Yes i appreciate it, but the account is reported and i can't able to create a supergroup or use CreateChannelRequest and also you are creating a group using CreateChannelRequest but i am creating a group using CreateChatRequest
Читать полностью…Executed Code 👑
async def CreateChannel(client, title='Aayco', about=None, group=False):
if about is None:
about = str(datetime.now())
try:
result = await client(functions.channels.CreateChannelRequest(
title=title,
about=about,
megagroup=group
))
return True, result.chats[0].id
except:
return False, None
result,chat_id = await CreateChannel(client)
print(chat_id if result else 'Error')
2891488289Читать полностью…
With createchatrequest result.chats[0].id wasn't working
Читать полностью…