我正在使用 Telethon API 从群组中将成员添加到我的频道,但是添加到我的频道的用户在添加后立即被禁止,因此他们没有被添加但被禁止。
如何解禁他们?使用 Telethon API
邀请他们:
client(EditBannedRequest(
channel, user, ChannelBannedRights(
until_date=datetime.datetime.now() + datetime.timedelta(minutes=1),
view_messages=True
)
client(InviteToChannelRequest(
channel,
[ user ]
))
除了一些例外情况,例如:
except UserNotMutualContactError as e:
except UserPrivacyRestrictedError as e:
except PeerFloodError as e:
except FloodWaitError as e:
我给予权利:
rights = ChannelAdminRights(
change_info=False,
post_messages=False,
edit_messages=None,
delete_messages=True,
invite_users=True,
pin_messages=True,
ban_users=None,
add_admins=True )
client(EditAdminRequest(channel, user, rights))
我的频道最近的操作显示“禁止用户名”
非常感谢您的帮助。谢谢