Skip to content

Yrashka200/Telegram-Bot-Bio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram Bio Bot

A comprehensive Telegram bot for showcasing personal bio, projects, skills, and social links. Built with Python and the Telegram Bot API.

Features

  • Interactive Menu: Easy navigation with inline keyboard buttons
  • Bio Information: Personal details, education, and background
  • Projects Showcase: Display your projects with descriptions and links
  • Social Links: Direct links to your social media profiles
  • GitHub Integration: Real-time GitHub statistics including repositories, stars, followers, and top languages
  • Skills Section: Programming languages and current learning focus
  • Contact Information: Easy way for others to reach you
  • Source Code Sharing: Share the bot's source code directly
  • Multiple Commands: Support for both slash commands and interactive buttons

Commands

  • /start - Main menu with all options
  • /help - List all available commands
  • /bio - Quick bio summary
  • /skills - Programming skills and learning focus
  • /projects - View all projects
  • /github - GitHub statistics
  • /contact - Contact information

Requirements

  • Python 3.7+
  • Telegram Bot Token from @BotFather
  • GitHub account (optional, for stats)

Installation & Setup

1. Clone the Repository

git clone https://github.com/Yrashka2025/Telegram-Bot-Bio.git
cd Telegram-Bot-Bio

2. Install Dependencies

pip install -r requirements.txt

3. Get Your Telegram Bot Token

  1. Open Telegram and search for @BotFather
  2. Send /newbot command
  3. Follow the instructions to create your bot
  4. Copy the bot token provided

4. Configure Environment Variables

Create a .env file in the project root or set environment variables:

# For Linux/Mac
export BOT_TOKEN="your_bot_token_here"
export GITHUB_USERNAME="your_github_username"

# For Windows
set BOT_TOKEN=your_bot_token_here
set GITHUB_USERNAME=your_github_username

Or create a .env file:

BOT_TOKEN=your_bot_token_here
GITHUB_USERNAME=your_github_username

5. Create Your Personal Configuration

Option A: Use the Configuration Creator (Recommended)

Run the interactive configuration creator:

python creater_bio.py

This script will guide you through setting up your personal information, social links, and projects. It will create a config.py file with your customized settings.

Option B: Manual Configuration

Edit the BioBot class in bot.py directly or create a config.py file with your information. See config.py for an example.

6. Run the Bot

python bot.py

Configuration

The bot is highly configurable. Key settings in the BioBot class:

  • user_info: Personal details
  • social_links: Dictionary of social media platforms and URLs
  • projects: List of project dictionaries with name, URL, and description

Example Configuration Structure

Here's an example of how your config.py file should be structured:

# User Information
user_info = {
    "name": "Yrashka",
    "age": 16,
    "programming_languages": [
        "Python",
        "HTML",
        "CSS"
    ],
    "studying": "Currently studying web development",
    "bio": "Passionate developer and student interested in technology and programming.",
    "education": "High School Student",
    "location": "Ukraine",
    "contact": "@yrashka200"
}

# Social Links
social_links = {
    "Instagram": "https://www.instagram.com/yrashka200",
    "Bluesky": "https://bsky.app/profile/yrashka.bsky.social",
    "GitHub": "https://github.com/Yrashka2025",
    "X (Twitter)": "https://x.com/Yrashka200"
}

# Projects
projects = [
    {
        "name": "Web Portfolio",
        "url": "https://github.com/Yrashka2025/Web-Portfolio",
        "description": "Personal web portfolio"
    },
    {
        "name": "Telegram Bot Bio",
        "url": "https://github.com/Yrashka2025/Telegram-Bot-Bio",
        "description": "This bot's source code"
    }
]

GitHub Integration

The bot automatically fetches real-time GitHub statistics including:

  • Total repositories
  • Followers and following
  • Total stars across all repositories
  • Top programming languages
  • Most starred repository
  • Profile creation date

Auto-Import Projects from GitHub

The bot can automatically import your GitHub repositories as projects! When enabled in the configuration:

  • Set auto_import_github_projects = True in your config file
  • Configure max_github_projects to limit the number of imported projects
  • Your GitHub repositories will be automatically added to your manually configured projects
  • Only public, non-forked repositories are imported
  • Projects are sorted by most recently updated

This feature allows you to keep your project list automatically synchronized with your GitHub profile.

Customization

The bot uses Markdown formatting for a modern look. You can customize:

  • Messages and formatting
  • Button labels
  • Additional sections

Logging

The bot includes comprehensive logging:

  • Startup/shutdown events
  • API request successes/failures
  • Error handling with detailed messages

Error Handling

  • Network timeouts for API calls
  • Graceful handling of missing data
  • User-friendly error messages
  • Automatic retries for failed requests

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages