Warning: mkdir(): No space left on device in /var/www/tgoop/post.php on line 37

Warning: file_put_contents(aCache/aDaily/post/python_with_mohammad/--): Failed to open stream: No such file or directory in /var/www/tgoop/post.php on line 50
آموزش پایتون و برنامه نویسی@python_with_mohammad P.103
PYTHON_WITH_MOHAMMAD Telegram 103
مرحله ۴: دریافت نام شهر از کاربر
حالا می‌خوایم باتمون بتونه نام شهر رو از کاربر دریافت کنه. برای این کار از MessageHandler استفاده می‌کنیم.

from telegram.ext import MessageHandler, Filters

def get_city(update: Update, context: CallbackContext):
city = update.message.text
update.message.reply_text(f'شهر شما: {city}. در حال دریافت اطلاعات آب‌وهوا...')
# در مرحله بعدی، اطلاعات آب‌وهوا رو دریافت می‌کنیم

dispatcher.add_handler(MessageHandler(Filters.text & ~Filters.command, get_city))



tgoop.com/python_with_mohammad/103
Create:
Last Update:

مرحله ۴: دریافت نام شهر از کاربر
حالا می‌خوایم باتمون بتونه نام شهر رو از کاربر دریافت کنه. برای این کار از MessageHandler استفاده می‌کنیم.


from telegram.ext import MessageHandler, Filters

def get_city(update: Update, context: CallbackContext):
city = update.message.text
update.message.reply_text(f'شهر شما: {city}. در حال دریافت اطلاعات آب‌وهوا...')
# در مرحله بعدی، اطلاعات آب‌وهوا رو دریافت می‌کنیم

dispatcher.add_handler(MessageHandler(Filters.text & ~Filters.command, get_city))

BY آموزش پایتون و برنامه نویسی


Share with your friend now:
tgoop.com/python_with_mohammad/103

View MORE
Open in Telegram


Telegram News

Date: |

While some crypto traders move toward screaming as a coping mechanism, many mental health experts have argued that “scream therapy” is pseudoscience. Scientific research or no, it obviously feels good. With Bitcoin down 30% in the past week, some crypto traders have taken to Telegram to “voice” their feelings. Co-founder of NFT renting protocol Rentable World emiliano.eth shared the group Tuesday morning on Twitter, calling out the "degenerate" community, or crypto obsessives that engage in high-risk trading. End-to-end encryption is an important feature in messaging, as it's the first step in protecting users from surveillance. Among the requests, the Brazilian electoral Court wanted to know if they could obtain data on the origins of malicious content posted on the platform. According to the TSE, this would enable the authorities to track false content and identify the user responsible for publishing it in the first place.
from us


Telegram آموزش پایتون و برنامه نویسی
FROM American