telethonchat | Unsorted

Telegram-канал telethonchat - Telethon Chat

6095

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

Subscribe to a channel

Telethon Chat

How can we tell if a group is private or public? 🤔

Читать полностью…

Telethon Chat

Yes, of course, no problem.

Do you have any ideas why this error might occur in this context?

Читать полностью…

Telethon Chat

Well I guess the best you can do this case is making a pull request since I don't think they will add these stuff

Читать полностью…

Telethon Chat

Telethon Api exceptions are written manually, and they probably won't add known each exceptions for requests since it's boring and useless while they made a total list of exceptions and you can simply recognize yourself or try it out, at most they will merge your PR.

Читать полностью…

Telethon Chat

😐😐I don't know why do you ask something and when you're responded, you don't accept even without testing

Читать полностью…

Telethon Chat

Pay attention to the difference between a group and a supergroup!!

Читать полностью…

Telethon Chat

Or handle if the peer is a channel, then use GetFullChannelRequest instead of GetFullChatRequest

Читать полностью…

Telethon Chat

^ When I run this code:

@bot.on(events.NewMessage(func=lambda e: e.is_group))
async def GROUP(m: message.Message):
    chat_id = int(m.chat_id)
    n = await bot(functions.messages.GetFullChatRequest(chat_id))
    print(n)

I get this error:

Unhandled exception on GROUP
Traceback (most recent call last):
File "/root/musicplayer/bot.py", line 199, in GROUP
participant = await bot(functions.channels.GetParticipantRequest(chat_id, user_id))
File "/usr/local/lib/python3.10/dist-packages/telethon/client/users.py", line
30, in __call__
return await self._call(self._sender, request, ordered=ordered)
File "/usr/local/lib/python3.10/dist-packages/telethon/client/users.py", line
92, in _call
result = await future
telethon.errors.rpcerrorlist.UserNotParticipantError: The target user is not a member of the specified megagroup or channel (caused by GetParticipantRequest)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/telethon/client/updates.py", line 570, in _dispatch_update
await callback(event)
File "/root/musicplayer/bot.py", line 202, in GROUP
n= await bot(functions.messages.GetFullChatRequest(chat_id))
File "/usr/local/lib/python3.10/dist-packages/telethon/client/users.py", line
92, in _call
result = await future
telethon.errors.rpcerrorlist.ChatIdInvalidError: Invalid object ID for a chat. Make sure to pass the right types, for instance making sure that the request is designed for chats (not channels/megagroups) or otherwise look for a different one more suited\nAn example working with a megagroup and AddChatUserRequest, it will fail because megagroups are channels. Use InviteToChannelRequest instead (caused by GetFullChatRequest)

Читать полностью…

Telethon Chat

gist.github.com/yummy1gay/d926f464023c666dfd912cf064cea65b for example

Читать полностью…

Telethon Chat

/channel/TelethonChat/659771 shall work

Читать полностью…

Telethon Chat

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.

Читать полностью…

Telethon Chat

How to edit bot name using telethon?

Читать полностью…

Telethon Chat

Ok this method for unban.
Can i add users?

Читать полностью…

Telethon Chat

That's rude. Why are you banning them?

Читать полностью…

Telethon Chat

have any links ? I'm not a member of any

Читать полностью…

Telethon Chat

It's self-explaining, can this peer send story? no STORIES_TOO_MUCH

if there are no stories that make it too much, it's Telegram being itself and restricting certain regions

Читать полностью…

Telethon Chat

the telegram backend can add and remove errors whenever they want, so it's impossible to offer an always-updated list.

the reference says "known" errors, not "all" errors for this reason

Читать полностью…

Telethon Chat

Maybe, I just reported it for a future update (if needed). But in general, it's interesting why Telegram returns such an error on this request. 🤔

Читать полностью…

Telethon Chat

use English in here please

Читать полностью…

Telethon Chat

هم برای گروهه هم سوپر گروه

Читать полностью…

Telethon Chat

telethon.errors.rpcbaseerrors.BadRequestError: RPCError 400: STORIES_TOO_MUCH (caused by CanSendStoryRequest)



https://tl.telethon.dev/methods/stories/can_send_story.html

An error that occurs when using CanSendStoryRequest. This is not in the documentation.

Читать полностью…

Telethon Chat

likely you need to add and not e.is_channel

Читать полностью…

Telethon Chat

TL Reference for SetChatAvailableReactions

Читать полностью…

Telethon Chat

How can I change the allowed reactions under channel posts?

Читать полностью…

Telethon Chat

Hi. Can i transfer gifts from channel with userbot?

Читать полностью…

Telethon Chat

TL Reference for SetBotInfo

Читать полностью…

Telethon Chat

TL Reference for InviteToChannel

Читать полностью…

Telethon Chat

/channel/TelethonChat/582672

Читать полностью…

Telethon Chat

I banned many users from any channel

Can i unban users and add again users to channel?

with telethon and bot

client(EditBannedRequest(
entity,
user_id,
ChatBannedRights(until_date=None, view_messages=True)
))

Читать полностью…

Telethon Chat

you can probably try in any python or telegram bots group

Читать полностью…
Subscribe to a channel