-
Notifications
You must be signed in to change notification settings - Fork 9
Setting up an instance of Storeman Bot for your own server
tkaixiang edited this page Jan 4, 2023
·
4 revisions
The following guide assumes you are on a linux server such as Ubuntu.
- Follow here to get your
Bot API token
andclientID
- Invite your bot to your server using the invite link:
https://discord.com/api/oauth2/authorize?client_id=<clientID>&permissions=2147617792&scope=bot%20applications.commands
, replacing<clientID>
with your Bot's Client ID - Note: You should set your bot to "Private" inside the Discord Developer Portal so that people can't invite and use your bot
- Invite your bot to your server using the invite link:
- Clone the Storeman-Bot repo
git clone https://github.com/Tkaixiang/Storeman-Bot.git
- Move into the directory, create a
.env
file with the necesarry information
cd Storeman-Bot
nano .env
and add the following into the file:
STOCKPILER_TOKEN=<YOUR_BOT_API_TOKEN_HERE> # Example Bot Token: MTk4NjIyNDgzNDcxOTI1MjQ4.Cl2FMQ.ZnCjm1XVW7vRze4b7Cq4se7kKWs
NODE_ENV=production
STOCKPILER_CLIENT_ID=<YOUR_BOT_CLIENT_ID_HERE>
STOCKPILER_MULTI_SERVER=false
APP_PORT=80 # Put the port you want
You may add a STOCKPILER_GUILD_ID=<GUILD_ID>
during development to speed up registering of slash commmands. Otherwise, Discord can take up to 1 hour to register slash commands to your server
- Move into the directory, run docker-compose
docker-compose up -d
- Inside your Discord server, the bot should now be online, if it isn't, check
docker-compose logs bot
for any errors
- Inside your Discord server, type
/spsetpassword <password>
to setup a new password for usage in the Stockpiler app- This is your Bot Password for later on
- Type
/splogichannel set <a_channel>
to set a channel as the"logi-channel"
where Storeman Bot will send the scanned information- Ensure that Storeman Bot has permissions to send & edit messages inside that channel
- You can set targets by typing
/sptarget set
- A HTTP server will be started on
0.0.0.0:8090
so please allow that port through any firewalls you have- The Bot Host for later on is hence
http://<YOUR_SERVER_IP>:8090
- The Bot Host for later on is hence
- To update Storeman Bot, simply run:
docker-compose pull
inside the root folder of the directory and restart the bot usingdocker-compose down
anddocker-compose up -d
- If you make your own changes to the bot files, such as changing some text, run
docker-compose up -d --build
to build a docker image locally