This Telegram bot helps you create and manage detailed profiles for your pets, including breed, age, size, health issues, allergies, and notes. You can skip any step and come back to it later. The bot also provides periodic reminders to update your pet's details.
/start: Initiates the bot and starts the conversation to create or update a pet profile./set_reminder: Sets a daily reminder to update your pet's details./cancel: Cancels the current conversation.
To set up the database schema for the Pet Bot application, run the following command:
sqlite3 pet_bot.db < db_schema.sql
Usage:
- This command initializes the SQLite database
pet_bot.dbwith the schema defined indb_schema.sql.
When to Use:
- Run this command during the initial setup of the application or when setting up the database schema for the first time.
Potential Issues:
- Not running this command may result in missing database tables or an incorrect database structure, leading to database errors or the application not functioning as expected.
To start the bot, send the /start command. The bot will guide you through providing details about your pet.
/start
The bot will ask for the following details. You can skip any step by sending the /skip command.
- Breed: What is your pet's breed?
- Age: How old is your pet?
- Size: What is the size of your pet?
- Health Issues: Does your pet have any health issues?
- Allergies: Does your pet have any allergies?
- Notes: Would you like to add any notes about your pet?
/start
Hi! Let's create a profile for your pet. What is your pet's breed?
Indie
Great! How old is your pet?
3 years
What is the size of your pet?
Medium
Does your pet have any health issues?
No
Does your pet have any allergies?
None
Would you like to add any notes about your pet?
Very friendly and loves to play fetch.
Thank you! Your pet's profile has been created. You can update the details anytime.
To set a daily reminder to update your pet's details, send the /set_reminder command.
/set_reminder
You will be reminded to update your pet's details daily.
To cancel the current conversation, send the /cancel command.
/cancel
Bye! I hope we can talk again some day.
If you send an unknown command, the bot will inform you and provide guidance on how to use the bot.
/unknowncommand
Sorry, I didn't understand that command. Here are the commands you can use:
- /start: Start the conversation to create or update a pet profile.
- /set_reminder: Set a daily reminder to update your pet's details.
- /cancel: Cancel the current conversation.
Ensure your bot is running by executing the app.py script:
python app.pytelegram-bot/
├── app.py
├── conversations.py
├── reminders.py
├── db.py
├── db_schema.sql
├── .env
└── requirements.txt
Create a .env file in the root directory with the following content:
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
Replace your_telegram_bot_token with your actual Telegram bot token.
Install the required packages using pip:
pip install -r requirements.txtThis project is licensed under the MIT License.