You can install PostgreSQL for your platform here
-
Go to the Discord Developer Portal and create a new application by clicking the button. Enter a name for the application when prompted.

-
Create a bot user inside your application. In the settings menu, go to the "Bot" menu.

-
Copy the bot user token (seen in the image below) - We'll need that later! Do not share your token with anyone. If someone obtains your bot user token, they gain full control of your bot. Be careful!

-
Within your bot user settings, make sure both "intents" settings are enabled.

Setup configuration options:
- LilyBot can be set up with Python.
-
Open your command line/terminal interface and go to the directory where LilyBot's code is located.
- If you're not familiar with how to do that:
- On Windows, open CMD or Powershell. On Mac and Linux, open the Terminal. and type
cd "path/to/directory". Alternatively, on Windows, go to the directory in the File Explorer app. Click the bar that is circled in the image below and typecmd. Press enter and the command line should open up within that directory. Also, you can use an integrated terminal with an IDE of your choice.
- On Windows, open CMD or Powershell. On Mac and Linux, open the Terminal. and type
- If you're not familiar with how to do that:
-
Install dependencies with
python -m pip install -Ur requirements.txtin your command line interface.- If that doesn't work, try replacing
pythonwithpython3.
- If that doesn't work, try replacing
-
Run the bot once with
python -m lilybot. This will crash, but generate a default config file.- LilyBot uses json for its config file
-
Add the Discord bot account's token to
discord_tokeninconfig.json -
If you have a Google Maps API key, a Twitch API client ID and client secret, and/or a Reddit client ID and client secret, add them to the appropriate places in
config.json. If you don't, your bot will still work, but you won't be able to use the commands that rely on these tokens. -
Add your database connection info to
db_urlinconfig.jsonusing the following format:postgres://user:password@host:portReplace
hostwith your database IP, orlocalhostif it's on the same PC.portis by default 5432. If the user has no password, you can remove the colon and password. The default user for the above installation ispostgres, however we strongly suggest making aLilyBotuser for security reasons using this guide. -
Add your Discord user ID, and anyone else's ID who should be able to use the developer commands, to the list
developersinconfig.json- Be careful giving this out. Developers can control everything your bot does and potentially get your bot user token!
-
The default command prefix is &. If this is already in use on your server or you would like another prefix, you can change the
prefixvalue inconfig.json. -
To configure lavalink:
- **Set the
hostandportvalues to which values that you have set up.
- Run the bot again. You should see
Signed in as username#discrim (id)after a few seconds.
-
A new "permissions" menu should appear below. Select all the permissions that you want your instance of LilyBot to have. If you want all permissions and you trust your instance wholeheartedly, select "Administrator"

-
The bottom of the scopes menu should have a URL. Copy and paste that URL into a new tab in your browser. It'll open a page where you can invite a bot to your server.

LilyBot requires Postgres. You can set up Postgres on your own server or use a service such as ElephantSQL. To make it work in LilyBot,
install the psycopg2 pip package, then change the db_url key in config.json to a URL that follows this format:
postgresql://username:password@host/db_name_in_postgres with the correct information filled in.

