956 B
956 B
Telegram Joke Bot
A simple Telegram bot that tells jokes when you send it the /joke command.
Setup Instructions
-
Install required packages
pip install -r requirements.txt -
Get a bot token
- Talk to @BotFather on Telegram
- Create a new bot with
/newbot - Copy the token provided by BotFather
-
Set your bot token You can set your bot token in two ways:
Option A: Set as environment variable
export BOT_TOKEN="your_token_here"Option B: Replace "YOUR_BOT_TOKEN_HERE" in jokes.py with your actual token
-
Run the bot
python jokes.py
Bot Commands
/start- Start the bot and get welcome message/joke- Get a random joke/help- Show help message
Features
- Sends random jokes from a predefined list
- Easy to add more jokes to the collection
- Simple and lightweight implementation