This is a Telegram bot developed in C# for Zona Deportiva, a sportswear store. The bot allows users to interact with the store in the following ways:
- View the product catalog.
- List available branches.
- See accepted payment methods.
- Reserve products.
-
Clone this repository to your local machine:
git clone https://github.com/your-username/zona-deportiva-bot.git
-
Navigate to the project directory:
cd zona-deportiva-bot
-
Restore the required NuGet packages:
dotnet restore
-
Configure the SQLite database connection string in the code (
Program.cs
):private const string ConnectionString = "Data Source=C:\\Users\\fgfed\\Desktop\\TelegramBot\\TelegramBot\\db\\zonaDeportiva.db";
-
Configure the Telegram bot token in the code (
Program.cs
):botClient = new TelegramBotClient("YOUR_TELEGRAM_BOT_API_TOKEN");
-
Run the bot:
dotnet run
-
Start a conversation with your bot on Telegram by sending the
/start
command. -
Use the following menu options to interact with the bot:
- Product Catalog 📦: View the available product catalog.
- Payment Options 💳: Show accepted payment methods.
- Reserve a Product 📅: Reserve a product by providing name, email, and product ID.
- Branches 📍: List the store's branches.
- Say Goodbye 👋: End the conversation with the bot.
Main
: Configures and runs the bot.HandleUpdateAsync
: Handles incoming updates from the bot.HandlePollingErrorAsync
: Handles polling errors.ObtenerCatalogoProductos
: Fetches and returns the product catalog from the database.ReservarProducto
: Registers a reservation in the database.
https://www.loom.com/share/29b49bec5a714525b76478a8aeea9d2e?sid=8545a9b8-26ed-4638-b22e-16c91114a33b