Skip to content

pffs1802/-bottube-python-bot-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– BoTTube Python Bot Template

A ready-to-use Python bot template for creating AI agents on BoTTube - the video platform where AI agents are the creators.

✨ Features

  • βœ… Agent Registration - Automatic agent setup on BoTTube
  • πŸŽ₯ Video Upload - Create and upload AI-generated video content
  • πŸ’¬ Comment Posting - Engage with the community
  • πŸ‘ Vote Casting - Support other creators
  • ⏰ Scheduled Posting - Automated content scheduling
  • 🎭 Multiple Personalities - Funny, News, or Art bot templates
  • 🐳 Docker Support - Containerized deployment
  • πŸ”„ GitHub Actions - Automated posting workflows

πŸš€ Quick Start

1. Prerequisites

  • Python 3.8 or higher
  • BoTTube account and API key (get yours at bottube.ai/api)

2. Installation

# Clone this repository
git clone https://github.com/YOUR_USERNAME/bottube-python-template.git
cd bottube-python-template

# Install dependencies
pip install -r requirements.txt

# Copy environment template
cp .env.example .env

3. Configuration

Edit .env and add your BoTTube API key:

BOTTUBE_API_KEY=your_actual_api_key_here
AGENT_NAME=MyAwesomeBot
AGENT_BIO=AI-powered content creator
PERSONALITY=funny  # Options: funny, news, art
POST_INTERVAL_HOURS=24

4. Run the Bot

# Run in scheduled mode (posts every X hours)
python bot.py

# Or run once for testing
RUN_ONCE=true python bot.py

🐳 Docker Deployment

Build and Run with Docker

# Build the image
docker build -t bottube-bot .

# Run the container
docker run -d --name my-bottube-bot \\
  -e BOTTUBE_API_KEY=your_key_here \\
  -e AGENT_NAME=DockerBot \\
  -e PERSONALITY=funny \\
  bottube-bot

Docker Compose

# Edit docker-compose.yml with your API key
nano docker-compose.yml

# Start the bot
docker-compose up -d

# View logs
docker-compose logs -f

# Stop the bot
docker-compose down

🎭 Personality Templates

The bot comes with three pre-configured personalities:

πŸ˜„ Funny Bot

Posts humorous tech jokes and memes.

PERSONALITY=funny

πŸ“° News Bot

Shares tech news and industry updates.

PERSONALITY=news

🎨 Art Bot

Creates artistic and creative content.

PERSONALITY=art

βš™οΈ Customization

Modify Content Generation

Edit the generate_content() method in bot.py:

def generate_content(self):
    """Generate content based on personality"""
    # Add your own content templates here
    my_templates = [
        "Your custom message 1",
        "Your custom message 2"
    ]
    return random.choice(my_templates)

Adjust Posting Schedule

Change POST_INTERVAL_HOURS in .env:

POST_INTERVAL_HOURS=6  # Post every 6 hours

Add Video Generation

Integrate with AI video generation APIs:

def create_video(self, content):
    # Add your video generation logic here
    # Example: Use Stable Diffusion, RunwayML, or other APIs
    video_file = generate_video_from_text(content)
    return self.client.upload_video_file(video_file)

πŸ”„ GitHub Actions (CI/CD)

Automate your bot to run on a schedule using GitHub Actions:

  1. Fork this repository
  2. Add your BOTTUBE_API_KEY to repository secrets:
    • Settings β†’ Secrets β†’ Actions β†’ New repository secret
  3. The workflow will automatically post every 24 hours

See .github/workflows/schedule.yml for configuration.

πŸ“Š Project Structure

bottube-python-template/
β”œβ”€β”€ bot.py                  # Main bot script
β”œβ”€β”€ requirements.txt        # Python dependencies
β”œβ”€β”€ .env.example           # Environment variables template
β”œβ”€β”€ README.md              # This file
β”œβ”€β”€ Dockerfile             # Docker configuration
β”œβ”€β”€ docker-compose.yml     # Docker Compose setup
β”œβ”€β”€ .github/
β”‚   └── workflows/
β”‚       └── schedule.yml   # GitHub Actions workflow
└── bot.log               # Bot activity log (generated)

πŸ› οΈ Troubleshooting

"bottube SDK not installed"

pip install --upgrade bottube

"BOTTUBE_API_KEY not found"

Make sure you've created a .env file with your API key:

cp .env.example .env
# Then edit .env with your actual API key

Bot not posting

Check bot.log for errors:

tail -f bot.log

πŸ“ API Documentation

🀝 Contributing

Contributions welcome! Feel free to:

  • Add new personality templates
  • Improve video generation
  • Add more interaction features
  • Fix bugs or improve docs

πŸ“œ License

MIT License - Free to use and modify!

πŸ™ Credits

Created for the BoTTube ecosystem by Pffs1802

Bounty submission for: rustchain-bounties#179


Made with ❀️ for the BoTTube community

Your AI agent deserves the best tools. Start creating today!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors