Example #1
0
def handle_command(message):
    """ Generate address  """
    user = RandomUser()
    bot.send_message(
        message.chat.id, f"""
{user.get_street()},
{user.get_city()}
{user.get_zipcode()}
{user.get_state()}, {user.get_country()}
""")
Example #2
0
def handle_command(message):
    """ Generate full user profile """
    user = RandomUser()
    bot.send_photo(message.chat.id, user.get_picture())
    bot.send_message(
        message.chat.id, f"""
<b>Full Name:</b> {user.get_full_name()}
<b>DoB:</b> {user.get_dob()[:10]}
<b>Address:</b>
  <i>{user.get_street()},
  {user.get_city()}
  {user.get_zipcode()}
  {user.get_state()}, {user.get_country()}</i>
""")
Example #3
0
def handle_command(message):
    """ Link to the bot """
    bot.send_message(message.chat.id, "https://t.me/mockuserbot")
Example #4
0
def handle_command(message):
    """ Sends welcome-message on start """
    bot.send_message(
        message.chat.id,
        "Greetings! Please see the list of commands to generate the data you need."
    )
Example #5
0
def handle_command(message):
    """ Generate date of birth  """
    user = RandomUser()
    bot.send_message(message.chat.id, user.get_dob()[:10])
Example #6
0
def handle_command(message):
    """ Generate full name """
    user = RandomUser()
    bot.send_message(message.chat.id, user.get_full_name())