A Discord bot that allows users to control their toys through Discord commands, with support for multiple devices, command queuing, and automatic connection management.
- Automatic device discovery and connection
- Support for multiple device types (Vibrators, Rotators, Linear actuators)
- Real-time connection monitoring and auto-reconnection
- Device status tracking and reporting
- Command queuing to prevent overrides
- Support for multiple users
- Queue status monitoring
- Command duration enforcement
/vibrate- Control vibration intensity and duration/rotate- Control rotation speed and duration/linear- Control linear actuator position and duration/stop- Stop current command and clear queue
/list_devices- Show all connected devices and their capabilities/rescan- Manually scan for and reconnect toys/connection_status- Check connection status of bot and toys/queue_status- Check command queue status for a device/clear_queue- Clear the command queue for a device
/ai_control- Start AI-controlled patterns/stop_ai- Stop current AI pattern/list_patterns- Show available AI patterns
- Python 3.7 or higher
- Windows 10 or higher (for Intiface Central compatibility)
- Discord Bot Token
- Intiface Central running locally
- Buttplug-compatible toys
- Clone the repository:
git clone https://github.com/Reclassified/Love-s-Bot.git
cd Love-s-Bot- Install required packages:
pip install -r requirements.txt- Create a
.envfile with the following variables:
DISCORD_TOKEN=your_discord_bot_token
UserID=your_discord_user_id
- Start Intiface Central and ensure it's running on the default WebSocket URL (ws://127.0.0.1:12345)
/vibrate device_id intensity time_sec
Example: /vibrate 0 50 30 # Vibrate device 0 at 50% intensity for 30 seconds
/rotate device_id intensity time_sec
Example: /rotate 0 50 30 # Rotate device 0 at 50% speed for 30 seconds
/linear device_id position time_sec
Example: /linear 0 50 30 # Move linear actuator to 50% position over 30 seconds
/list_devices # Show all connected devices
/rescan # Manually scan for toys
/connection_status # Check connection status
/queue_status device_id # Check queue status
/clear_queue device_id # Clear command queue
/ai_control device_id pattern duration
Example: /ai_control 0 wave 30 # Run wave pattern on device 0 for 30 seconds
Available patterns:
- wave: Gradually increases and decreases intensity
- pulse: Alternates between high and low intensity
- escalate: Gradually increases intensity
- random: Generates random intensity patterns
The bot implements a command queue system to prevent command overrides and ensure proper execution:
- Each device has its own command queue
- Commands are processed in order (FIFO)
- Each command runs for its full duration
- Next command starts only after current command completes
- Stop commands bypass the queue for immediate response
- Use
/queue_statusto check:- Current device status (Idle/Busy)
- Number of commands in queue
- Position of your command in queue
/stop- Stops current command and clears queue/clear_queue- Clears all pending commands
The bot includes automatic connection management:
-
Monitors connections to:
- Discord
- Intiface Central
- Individual devices
-
Automatic reconnection for:
- Lost Discord connection
- Lost Intiface Central connection
- Disconnected devices
-
Connection status monitoring:
- Real-time status updates
- Automatic reconnection attempts
- Detailed error logging
- Intensity limits (0-100%)
- Time limits (1-3600 seconds)
- Command validation
- Automatic device stopping
- Queue management for safe operation
-
Device Not Found
- Ensure Intiface Central is running
- Use
/rescanto manually scan for devices - Check device is in pairing mode
-
Connection Issues
- Check Intiface Central is running
- Verify WebSocket URL (ws://127.0.0.1:12345)
- Use
/connection_statusto check status
-
Command Not Working
- Check device is connected
- Verify command parameters
- Check queue status with
/queue_status
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
This bot is intended for adult use only. Users are responsible for using this bot safely and responsibly.