英文:
Transfer access rights to the Telegram-channel
问题
我需要将访问权限转移到Telegram频道。
我试图使用EditCreatorRequest函数来实现这个目标。但是我无法成功,因为我不明白需要指定哪些参数,特别是我困在了指定密码上。不幸的是,文档中没有明确的示例。感谢大家的帮助。
英文:
I need to transfer access rights to the Telegram-channel.
I'm trying to do this using the EditCreatorRequest function. But it doesn't work out for me, because I don't understand what parameters need to be specified, namely, I'm stuck on specifying a password. Unfortunately, there is no clear example in the documentation. Thank you all for your help.
答案1
得分: 1
使用库内部的函数:
from telethon.password import compute_check
from telethon.tl.functions import account, channels
pass_info = await client(account.GetPasswordRequest())
input_srp = compute_check(
pass_info, "your_password"
)
await client(
channels.EditCreatorRequest(
channel, user,
password=input_srp
)
)
英文:
Use the internal function the library uses:
from telethon.password import compute_check
from telethon.tl.functions import account, channels
pass_info = await client(account.GetPasswordRequest())
input_srp = compute_check(
pass_info, "your_password"
)
await client(
channels.EditCreatorRequest(
channel, user,
password=input_srp
)
)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论