Код: Выделить всё
telethon.errors.rpcerrorlist.BotMethodInvalidError: The API access for bot users is restricted. The method you tried to invoke cannot be executed as a bot
и кода
Код: Выделить всё
from telethon.sync import TelegramClient, events, functions, types
from telethon.tl.types import PeerChat, PeerChannel
bot = TelegramClient('bot', api_id, api_hash).start(bot_token=token)
with bot:
print(bot.get_me())
# I have this link https://telegram.me/joinchat/
result = bot(functions.messages.ImportChatInviteRequest(hash=""))
print(result)
- AllowGroups: включить
- GroupPrivacy: включена
Подробнее здесь: https://stackoverflow.com/questions/703 ... l-or-group
Мобильная версия