Skip to main content
Prerequisites:
  • Python 3.8 or higher
  • A running Lavalink server
  • Discord bot token and application
Follow these steps to set up your development environment and start building with Salada.
1

Install Salada

2

Set up Lavalink server

Download and configure your Lavalink server for development:
  1. Download the latest Lavalink.jar from GitHub releases
  2. Create an application.yml file:
  1. Start your Lavalink server:
3

Create your bot

Set up your Discord bot with Salada:

Environment Configuration

Set up your environment variables for development:
Then load them in your application:

Development Setup

Install additional development dependencies:

Hot Reloading

For faster development, use a tool like watchdog or run your bot with auto-restart:

Testing Your Setup

Create a simple test command to verify everything is working:

IDE Setup

We recommend using these extensions for the best development experience:

Visual Studio Code

  • Python - Official Python extension
  • Pylance - Fast Python language server
  • Python Type Hint - Type hint support
  • autopep8 or Black - Code formatting

PyCharm

  • Built-in Python support with type checking
  • Discord.py autocomplete
  • Integrated debugger

Configuration Files

Create these files in your project root: pyproject.toml
requirements.txt

Troubleshooting

Your bot needs proper permissions to join voice channels.
  1. Ensure your bot has “Connect” and “Speak” permissions
  2. Check if the voice channel isn’t full or restricted
  3. Verify the user is in a voice channel when creating the connection
This can happen when search sources aren’t properly configured.
  1. Check your Lavalink application.yml sources configuration
  2. Ensure YouTube and other sources are enabled (true)
  3. Try different search terms or platforms
  4. Check Lavalink logs for detailed error messages
Salada requires Python 3.8 or higher for optimal performance.
  1. Check your Python version: python --version
  2. Update Python if needed
  3. Reinstall dependencies: pip install --upgrade salada
Make sure all dependencies are properly installed.
  1. Create a virtual environment: python -m venv venv
  2. Activate it: source venv/bin/activate (Linux/Mac) or venv\Scripts\activate (Windows)
  3. Install requirements: pip install -r requirements.txt

Development Best Practices

  • Use virtual environments to isolate project dependencies
  • Use environment variables for sensitive data like tokens
  • Implement proper error handling for all Salada operations with try-except blocks
  • Test with different audio sources to ensure compatibility
  • Monitor Lavalink server logs during development
  • Use type hints for better development experience and code clarity
  • Follow PEP 8 style guidelines for clean, readable code
Ready to start building? Check out our API Reference for detailed documentation on all available methods and events.