Self-Hosting
How to self-host Friend Time.
Last updated
Was this helpful?
How to self-host Friend Time.
Last updated
Was this helpful?
or newer.
A or database.
Copy example config files.
Navigate to the config
folder of this project.
Copy all files ending in .example.json
and remove the .example
from the copied file names.
Ex: config.example.json
should be copied and renamed as config.json
.
Obtain a bot token.
You'll need to create a new bot in your .
See for detailed instructions.
At the end you should have a bot token.
Modify the config file.
Open the config/config.json
file.
You'll need to edit the following values:
client.id
- Your discord bot's .
client.token
- Your discord bot's token.
database.host
- The ip address that your database is running on (or localhost
)
database.database
- The name of the database to use.
database.username
- The username to use when accessing the database.
database.password
- The password of the user accessing the database.
Install packages.
Navigate into the downloaded source files and type npm install
.
Register commands.
In order to use slash commands, they first .
Type npm run commands:register
to register the bot's commands.
Run this script any time you change a command name, structure, or add/remove commands.
This is so Discord knows what your commands look like.
It may take up to an hour for command changes to appear.
You can run the bot in multiple modes:
Normal Mode
Type npm start
.
Starts a single instance of the bot.
Manager Mode
Type npm run start:manager
.
Starts a shard manager which will spawn multiple bot shards.
PM2 Mode
Type npm run start:pm2
.
Similar to Manager Mode but uses to manage processes.