Advertisement
21covid21

Untitled

May 12th, 2023
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. # Ask for the product name until a valid product name is specified
  2. while True:
  3. # Ask the question to the user
  4. self.bot.send_message(self.chat.id, self.loc.get("ask_product_name"))
  5. # Display the current name if you're editing an existing product
  6. if product:
  7. self.bot.send_message(self.chat.id, self.loc.get("edit_current_value", value=escape(product.name)),
  8. reply_markup=cancel)
  9. # Wait for an answer
  10. name = self.__wait_for_regex(r"(.*)", cancellable=bool(product))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement