Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Ask for the product name until a valid product name is specified
- while True:
- # Ask the question to the user
- self.bot.send_message(self.chat.id, self.loc.get("ask_product_name"))
- # Display the current name if you're editing an existing product
- if product:
- self.bot.send_message(self.chat.id, self.loc.get("edit_current_value", value=escape(product.name)),
- reply_markup=cancel)
- # Wait for an answer
- name = self.__wait_for_regex(r"(.*)", cancellable=bool(product))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement