A Discord bot that let's you start, stop and restart a Valheim server. It's basically just a way to access LinuxGSM_ (Linux Game Server Managers) scripts trough Discord.
This bot relies on your Valheim server being installed using LinuxGSM_. The bot uses LGSM scripts to execute it's commands.
You also need NodeJS and NPM installed.
NOTE! Make sure you're doing this as the "vhserver" user.
- Start by cloning the repository and installing the packages
git clone https://github.com/nlssn/gh-mjolnir.git gh-mjolnir
cd gh-mjolnir
npm install
- To be able to connect to a Discord server you will need a bot token.
Here's a guide on how to get a token. Store your token as a string called
token
insideconfig.json
. Your config file will look something like this:
{
"prefix": "!",
"token": "a_long_string_of_random_characters"
}
- Start the bot by running the following command within the gh-mjolnir directory
npm run start
NOTE! The default prefix is !. The prefix must be used before the command for it to work.
- start - Starts the server
- stop - Stops the server
- restart - Restarts the server
- Make sure the bot can run forever
- Standardize the way commands are handled
- Optionally require users to have a certain role within Discord to use the bot
- Add backup command
- Add info command (prints server IP, player count, etc.)
If you have any problems or suggestions for features, please post them here.