pytg icon indicating copy to clipboard operation
pytg copied to clipboard

Channel joining issue

Open downitch opened this issue 8 years ago • 2 comments

The problem

How can I join channels by channel name? like, sender.channel_join(@foochannel). But it's not working... What should I do? P.S. let us think, that @foochannel is the real one with more than 200 members (so it is not possible to invite me from creator or admin).

Your environment

python 2.7.5, last pytg, ubuntu 14.04

Steps to reproduce

Detailed steps to reproduce the issue.

tg = Telegram(
    telegram="tg/bin/telegram-cli",
    pubkey_file="tg/tg-server.pub")
sender = tg.sender
receiver = tg.receiver

def join(ch_name):
    sender.channel_join(ch_name)

Expected behavior

% username % joined channel

Actual behaviour

FailException: Error 38: u'can not parse arg #1' (command u'[disable_preview] channel_join @foochannel\n')

downitch avatar Aug 09 '16 16:08 downitch

I think that is #95, too

luckydonald avatar Sep 24 '16 22:09 luckydonald

Can someone throw together some examples of channel_join (or just post them here. I can make a pull request after we get a few examples)?

I find I can join channels by name if I was previously in the channel already. I'm still not sure about joining channel links. I need to play around with the tg-cli more.

Shatnerz avatar Nov 17 '16 16:11 Shatnerz