lolabray / lolabot

Lolabot - The Discord Bot for Lovense Toys

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LolaBot

Status Discord Platform GitHub Issues GitHub Pull Requests License

ko-fi


The Discord Bot that controls your Lovense toys.
Currently supports all Lovense brand toys (With no Contraction support on Max Toys)
Join the Discord server for support or to contribute to the bot: (https://discord.gg/4VGtUNKrkT)

A number of changes have been made for version 4.0.0, including adding new commands & parameters on top of the improved 3.0.1 experience allowing for all toys to work.
Please make sure to update all files including the config as there's more customisation in there.

πŸ“ Table of Contents

🧐 About

LolaBot was developed by a camgirl who was looking for a way to control her lovense toys in her discord server.
LolaBot is controlled by slash commands (example: /high) that activate the toys via the discord bot.

πŸŽ₯ Demo

Working

🎈 Usage

To use the bot, use the following slash commands once you've installed the bot

**LolaBot Commands:**

**General**
Ping      - Pong
Server    - Get Server information
User      - Get User information
Battery   - Get Battery of a Given Toy.

**Toy commands**
*Supported by All Lovense devices*
Vibrate     - Vibrate a specific or ALL toys with a specified power
StopVibrate - Stop Vibrating the Toy

High      - Vibrate a specific or ALL toys at MAX POWER
Medium    - Vibrate a specific or ALL toys at Medium Power
Low       - Vibrate a specific or ALL toys at low power
Stop      - Stop a specific or ALL toys.

*Only available on Lush, Hush, Ambi, Edge, Domi & Osci Toys*
Pulse     - Pulsate a specific or ALL possible toys
Grind     - Grind a specific or ALL possible toys
Circle    - Circle a specific or ALL possible toys

*Only available on Edge*
VibrateEdge - Vibrate the Top or Bottom an Edge Toy

*Only available on Nora*
RotateLeft  - Rotate a specific or ALL possible toys Counter Clockwise.
RotateRight - Rotate a specific or ALL possible toys Clockwise.
RotateStop  - Stop rotating on a specific or ALL possible toys.

*More commands are planned for some of the more specific toys like Max.*

🏁 Getting Started

Installing

  1. Install node.js at https://nodejs.org/en/. (Minimum v16.6 but, I recommend downloading the latest version of v16)

  2. Next, You will need to download the source code from GitHub. This can be done either via the Green Code Button and clicking Download ZIP, and Extracting the contents where you'd like.

  3. Then open a powershell window (Shift+LeftClick) in the LolaBot main folder.


working

  1. In that powershell window, download all the required packages for this to work. This includes some stuff for Discord and basic Web requests:
npm install

working

πŸš€ Deploying your own bot

  1. Log onto the Discord Developer Portal and create a new application.
    working

  2. Set your photo, name your bot, add a description.

  3. Select "Bot" on the side panel, under settings.
    working
    Click to find your token, copy this and add it to the file config.json that you downloaded.
    working
    Replace "YOUR-DISCORD-TOKEN" in config.json, with the token you copied. (KEEP THIS SAFE)
    working

  4. Next find your guild ID, which will also need to be replaced in config.json by:
    Turning on developer mode on your Discord client, under Settings/Advanced.
    working
    Once developer mode is on, right click on the server/channel your bot is joining and copy ID (bottom of menu). This is your guild ID.
    Copy ID

  5. Go to OAuth2 on the Discord Developer Portal, located on the side panel under settings, and select the URL Generator.
    working
    From here, click the bot & applications.commands scopes and generate a url. You can also set permissions below, or leave it blank.
    working
    Copy this url into your web browser and add the bot to a server you manage
    working

  6. Last, find your client ID by left clicking on the bot (once it's added in the previous step), going to 'copy ID' and replace in config.json.

Additional resources: Discord.Js Guide

πŸ”§ Configuring the Bot

As all great things should, you should be able to Customise your Toys to have fun. πŸ˜‰ In the bot we have Customisations for each of the Toy's Power, and the Default Power it will select when no Power is provided.

defaultPower requires you a Number from 1-20 (weakest - strongest)
toy_power is a List where you can provide the name which is displayed in Discord and Value is the Power which will be applied to the Bot. If you want to add a new item, copy a row and change the name & value to whatever you please.
REMEMBER to keep the comma at the end UNLESS it is the last row and keep them contained inside of the square brackets [ ].

	"defaultPower": 20,
	"toy_power": [
		{ "name": "low",    "value": 1 },
		{ "name": "medium", "value": 10 },
		{ "name": "high",   "value": 20 }
	]

Deploy the Bot

Deploying the bot will create the commands based upon which toys which are available within the app (even if they're not online). So if you have added more toys to your collection, please re-run this command and it will add them too.

  1. Go to the main file folder that you downloaded from GitHub and reopen your Powershell window (Shift+LeftClick) if you have closed it.

This time, copy and paste the following in powershell:

npm run deploy

This should reply with information about your toys and finally end off on: Successfully registered slash commands.
If this returns No information found in Lovense Config, Make sure that your Phone/Desktop App is online and re-try running the deploy script.

If this keeps on failing, please manually run https://api.lovense.com/api/lan/getToys in your browser and place the domain and httpsPort (Not to be confused with httpPort) inside of the config.json in the config_domain and config_port fields, and again retry.
This directly calls the local API for the information on the toys you have, but doesn't effect the usage of the bot. 😸

  1. Next, start the bot with the following command:
npm run main

If done correctly, the bot should say information about your current toys, and finally say LolaBot 3.0 - Ready to Play! when the bot is online and ready.
Do not close the powershell window while the bot is operating as this will stop it.
Each time you want to run the bot, you must repeat Step 2 and leave the powershell window open.

⛏️ Built Using

TO-DO for LolaBot

All work that is currently planned for LolaBot:

To-do:

  • Detailed Wiki
  • Bot Hosting

In Progress:

  • Neater code, a command handler plus separate files for commands
  • Commands for all Lovense toys, Currently missing specific commands for: Max [Added Edge]

Done:

  • Battery Life command
  • Ability to change parameters (toyId, domain/port) via discord commands - Technically this is made obsolete via the API
  • Complete Readme.md with full instructions for LolaBot
  • Upload LolaBot code, start readme.md

✍️ Authors

πŸ™Œ Contributors

Want to see your name here? Contribute to the project!

πŸŽ‰ Acknowledgements

About

Lolabot - The Discord Bot for Lovense Toys

License:GNU General Public License v3.0


Languages

Language:JavaScript 100.0%