A Discord and Second Life bot capable of relaying messages between inworld Second Life Groups, and Discord Channels.
Report Bug
·
Request Feature
Table of Contents
A Discord and Second Life bot capable of relaying messages between inworld Second Life Groups, and Discord Channels, supports (theoretically) as many groups as the second life allows(42 for normal accounts, 70 for premium). This has not been tested with more than 10 groups, your available memory is also a limitation.
- The Latest NPM:
npm install npm@latest -g
- Node:
-
Refer to Installing Node.js
-
If you are confused Installing Node.js and npm is a good place to start.
-
- A Discord Bot Token:
- Refer to This Guide if you are not sure how to do this.
- Discord Channel ID:
- This is a good video
- Second Life Group UUID:
- This SL Forums explains how
- In world the bot must be in the groups you want it to relay.
- Add your bot to a discord server using this link(add your CLIENT ID from your bot where specified)
- https://discord.com/oauth2/authorize?client_id=INSERT_CLIENT_ID_HERE&scope=bot&permissions=137976335360
- This gives the bot the following permissions: View Channels, Manage Webhooks, Send Messages, Embed Links, Use External Stickers and Emojis, Mention All Roles, and Read Message History.
- Add your Second Life Bot account(NOT YOUR ACCOUNT, THE BOTS!) to all the groups you want to relay. Make sure it has Join Chat enabled!
-
Clone the repo and open the repository folder:
git clone https://github.com/redrobotsl/discord-sl-chat-relay.git && cd discord-sl-chat-relay
-
Run npm install in the folder:
npm install --no-dev
-
Copy the
.env-example
to.env
:cp .env-example .env
-
Copy
config.js.example
toconfig.js
:cp config.js.example .config.js
-
Fill out
.env
with the required environment variables:DISCORD_TOKEN= OWNER= SL_FIRSTNAME= SL_LASTNAME= SL_PASSWORD= SL_START=
-
Edit
config.js
to map the inworld group UUIDS to teh Discord Channel IDS:relays: new Map([ ["SL GROUP UUID", "DISCORD CHANNEL ID"] // For just one group no comma after the bracket ]),
For Multiple:
relays: new Map([ ["SL Group UUID", "Discord Channel ID"], // For Multiple relays you need a comma after each bracket but the last one ["SL Group UUID", "Discord Channel ID"], // For Multiple relays you need a comma after each bracket but the last one ["SL Group UUID", "Discord Channel ID"], // For Multiple relays you need a comma after each bracket but the last one ["SL Group UUID", "Discord Channel ID"], // For Multiple relays you need a comma after each bracket but the last one ["SL Group UUID", "Discord Channel ID"], // For Multiple relays you need a comma after each bracket but the last one ["SL Group UUID", "Discord Channel ID"] // No Comma After the final bracket. ]),
-
Start the bot using:
node index.js
-
Invite the bot to your server:
- Here is how to do it
-
Add Region Restart Evasion with Fallback Regions in the Config File
- On Region Restart notice, teleport to a fallback region, as well as on login, if can't login to the main region, teleport to a fallback region, don't want your bots sticking around somewhere you don't want it
-
Add Reload Capability of SL and Discord Commands/Event files.
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
- CasperTech for their implementation of the SL Client in Node.js https://github.com/CasperTech/node-metaverse