在图表中如何正确使用函数?

时间:2018-03-09 20:50:46

标签: python telegram

有时当我在pyrogram中使用函数时,我收到以下输出:

{
    "_": functionName,
    "argName" : value,
    "arg2Name" : value2,
    # etc.
}

例如,如果我写:

functions.users.GetFullUser(types.InputUserSelf())

我收到:

{
    "_": "functions.users.GetFullUser",
    "id": {
        "_": "types.InputUserSelf"
    }
}

为什么我会收到这个结果?我该如何正确使用这些功能?

1 个答案:

答案 0 :(得分:1)

您应该使用send():

from pyrogram import Client
from pyrogram.api import functions

app = Client("test")
result = app.send(functions.users.GetFullUser(types.InputUserSelf()))
print(result)
相关问题