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.
-
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