Skip to content

spizzray/valentine-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Telegram Trivia Bot - Valentine's Edition

🎉 Introduction

This is a fun trivia bot that asks multiple-choice questions and tracks the user's score. At the end, it reveals a hidden message and asks "Will you be my Valentine?"

This bot was developed by Raymond Harrison for a special Valentine's Day event. Please support me by following me on 🥰:

The bot supports:

Multiple-choice questions with buttons
Interactive scoring system
Final reveal with Valentine's details


🛠️ Setup & Installation

1️⃣ Get a Telegram Bot Token from BotFather

To create your bot, follow these steps:

  1. Open Telegram and search for @BotFather.
  2. Start a chat and type:
    /newbot
    
  3. Follow the prompts:
    • Choose a bot name (e.g., TriviaQuestBot).
    • Choose a unique username (must end in bot, e.g., TriviaValentineBot).
  4. BotFather will provide you with a bot token (a long string of characters). Save this token as you'll need it later.

2️⃣ Install Python & Required Packages

Ensure Python is installed, then install the required dependencies:

pip install pyTelegramBotAPI python-dotenv

3️⃣ Set Up the .env File

To keep your token secure, create a .env file in the bot directory:

  1. Create a .env file in your bot's directory.

  2. Add your bot token to the file:

    TOKEN=your_bot_token_here
    

    replace your_bot_token_here with the token you obtained from BotFather.

  3. Save the file.


4️⃣ Modify the Date Message

In the bot.py file, locate the following line:

    if call.data == "yes":
        bot.send_message(chat_id, f"💖 It's a date! 🎉\n\n**Details:**\n📅 Date: 14 Feb\n🕕 Time: Evening\n📍 Location: Chinese Garden\n👗 Dress Code: Picnic 🧺")

Replace the date and time details with your Valentine's Day plans.

5️⃣ Run the Bot

Start the bot by running:

python bot.py

Once running, search for your bot on Telegram and type /start to begin the game!


🚀 Follow and support me on:

Hire me for your next project! Contact Me

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages