Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/326.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何从“获取发件人信息”;更新;价值_Python_Telegram Bot_Python Telegram Bot - Fatal编程技术网

Python 如何从“获取发件人信息”;更新;价值

Python 如何从“获取发件人信息”;更新;价值,python,telegram-bot,python-telegram-bot,Python,Telegram Bot,Python Telegram Bot,我试图从'update'参数获取发件人信息,从中返回什么?我正在使用“python电报机器人”包 def startBot(update, context): update.message.reply_text('HI I am ww helper') def main(): updater = Updater(TOKEN, use_context=True) dp = updater.dispatcher dp.add_handler(CommandHandl

我试图从'update'参数获取发件人信息,从中返回什么?我正在使用“python电报机器人”包

def startBot(update, context):
    update.message.reply_text('HI I am ww helper')

def main():
    updater = Updater(TOKEN, use_context=True)
    dp = updater.dispatcher
    dp.add_handler(CommandHandler("start", startBot))

您可以通过
update.message.from\u user

def startBot(update, context):
    print("USER:", update.message.from_user.first_name)
    update.message.reply_text('HI I am ww helper')
您可以在中以及中找到
Update
对象的文档,以供将来参考