- Prerequisites: what you need prior to setting the bot up
- Setup: instructions on how to set up the bot
- Features: the bots functionality within Discord
- Commands: a short description and example for each command
-
Create a Discord Application
View the Official Guide on how to create a Discord Application
*Please note that this Discord Bot does not require any special intents
Invite the bot to your server with the following link: https://discord.com/api/oauth2/authorize?client_id={YOUR_BOTS_ID}&permissions=242666032192&scope=applications.commands%20bot
-
Have a LEGO Universe client
You are not required to be hosting a LEGO Universe server to host this bot
All you are required is to have the
locale.xml
and thecdclient.sqlite
filesThe
locale.xml
can be found atPATH_TO_LU_CLIENT\client\locale\locale.xml
The
cdclient.sqlite
is not found in the client. You must create it from thecdclient.fdb
which is found in unpacked clients.If you are using a packed client, you can unpack just the
cdclient.fdb
using lunpack.exe with the following command:- Make sure the contents of
globs.txt
is just*.fdb
, otherwise you will unpack the whole client (which takes a lot more time) - Make sure
lunpack.exe
andglobs.txt
are in the same folder
lunpack.exe "PATH_TO_LU_CLIENT" - g "globs.txt"
To convert the
cdclient.fdb
to thecdclient.sqlite
, upload thecdclient.fdb
to https://fdb.lu-dev.net/. - Make sure the contents of
-
Run
git clone https://github.com/MasterTemple/LEGO-Universe-Discord-Bot.git
-
Configuration
Rename
.env.template
to.env
and fill in the data from the comments provided.If you do not have a
cdclient.sqlite
create one from yourcdclient.fdb
at https://fdb.lu-dev.net/. -
Install proper dependencies with
npm install
-
Transpile with
tsc --build
If
tsc
is not found, install it withnpm i typescript -g
and then runtsc --build
. -
Run
./lib/index.js
I would recommend using something that restarts if it crashes such as pm2
Install pm2 with
npm install pm2 -g
and run it withpm2 start .
Restart with
pm2 restart all
and stop withpm2 stop all
If you edit the cdclient.sqlite or locale.xml, they can be reloaded without restarting the bot by using the Slash Command
/reload
in Discord.If you edit the .env file, you just need to restart the bot.
This allows users to search objects by their name instead of relying on knowing the internal object id.
Message embeds allow for organizing and displaying data in a much more visually appealing way.
They are indicated below by the colored bar on the left and the darker background.
Normal Message
Message Embed
Message components are the buttons underneath the embed. These allow for the user to execute related commands on an object.
For example, an item that can be earned can also be bought. Instead of having to use /earn
and then /buy
, the user can use /earn
and then click the Buy
button.
The green button indicates the current command. Disabled/faded buttons show that an item cannot be obtained through a certain method.
If the user clicks the Buy
button, the message is edited to display the following
The current page index is indicated between the parenthesis in the title.
Page navigation can be controlled through the buttons on the bottom.
The blue hyper-linked text will take the user to the corresponding page of hosted LU Explorer that is specified in the configuration.
LU Explorer an angular.io webapp that displays LEGO Universe game data..
View the stats of an achievement!
View all rewards given from an activity!
View all smashables that drop an item!
View how to get an item!
View the stats of a mission!
Reload the data from the cdclient.sqlite and locale.xml!
View all items that have a skill!
View all items sold from a vendor!
View the stats of a brick!
View all missions that reward an item!
View the stats of an item!
View all missions from an NPC!
Open a dialog to report anything about this bot!
View all skills attached to an item!
View all vendors that sell an item!
View the stats of an enemy!
View stats about a level in LEGO Universe!
View all items given from a package!
View all activities that drop an item!
View all enemys given from a package!
View the skills in a cooldowngroup!
Open a dialog to execute multiple commands on this bot!
View all items in a loot table!
View the preconditions to use an item!
View the stats of a skill!
View all packages that drop an item!