Another Discord Bot
Node.js is what will be used to run the bot. Download Node.js 6.x from the website.
Open the Node.js Setup. In the options, make sure Node.js runtime
,npm package manager
and Add to PATH
are enabled. After that install Node.js.
Open up a windows powershell and run npm i -g windows-build-tools
. This will take a while as it will download and install both python 2.7 and c++ build tools, so you can run node-gyp builds.
And install it. The website is http://git-scm.com and make sure you choose "for command prompt".
Download FFMPEG from this website. Make sure to find the current Static Build for your OS Architecture (32bit/64bit).
Extract the files to the root of your harddrive, and rename the folder to ffmpeg.
windows key + x
- go to system
- on the left Advanced system settings
- Environment Variables
- under System variables find the variable Path hit edit
- Depending on your version of windows you may have a list of entries or a semicolon sperated field of entries.
- Hit the new button on the right
- add
c:\ffmpeg\bin
- add
;c:\ffmpeg\bin
to the end of the field.
Next you'll need to download the bot and configure it. Download the master
branch and put the unzipped files in a new folder on your computer. Next rename config_template.json
to config.json
and enter the correct information (more on that under Setting up kellerus).
For obtaining a Discord Bot token, please see this page.
Before running the bot you need to install the dependencies. In the folder you put the files in, Shift+Right click and select open command window here. In the command prompt type npm install
.
The bot should now be ready! Open a command prompt like above and type npm run start
to start the bot and see if it works.
Shift-RightClick in the folder that you downloaded and select Open command window here. Then type npm install
and hit Enter.
cd to where you cloned the GitHub repo and type npm install
. This will take a while.
Credits to bdistin/OhGodMusicBot
When deploying Kellerus, you need to initialize the config.json
once! Copy the config_template.json
from /src/
to /src/config.json
.
In this file, there are some mandatory and some optional settings. You need to change the mandatory settings, otherwise the Bot will not run.
The mandatory settings are token
, dbhost
, dbuser
, dbpassword
and dbport
.
You can retrieve the token from your discord application (on https://discordapp.com/developers/applications). You need to create a separate application for this bot. Under Bot, click on the Copy
button under "Click to Reveal Token" and paste it in the config.json
.
The bot needs a db connection. This database must be mysql
or mariadb
. We do not support a db-less version of this bot.
To create a database for local testing, you can use the docker_compose.yaml
for a docker setup or create your own database by hand.
Copy the host, user, passwort and port into the config.json
. We highly recommend to use a local database on the same instance as this bot will run.
This bot will not create its own database. The database must be created by you. The user the bot will use must have full access to this database, and this database only. The dbDataBase
specifies the name of this created database.
The bot will contact the Youtube Data API provided by Google. This lets the bot search for youtube videos by given search strings. The YoutubeApiKey
must be set in order to provide this functionality. Otherwise the Bot will spit out errors if the queue
commmand is used with search attributes.
Optional Settings are the discordUrl
, botPrefix
, playPrefix
, language
and commands
.
These settings can be left as they are, but give you some modifiability.
discordUrl
, this is a preset for a possible invite link for this bot. You need to fill in the client_id. This will give the Bot every permission that it does and will need.botPrefix
, this represents the single character, that will indicate a command to the bot. The message must start with this character in order to be detected as a legitimate command.playPrefix
, the bot has the functionaltiy to save and play small soundfiles. These can be uploaded to the bot via the commandadd
and played viaplay
. Writing every timeplay
is kind of tedious, this playPrefix provides a shortcut for theplay
command.language
, currently the bot is translated to german and english. You can add your own translations by copying the/src/assets/language/en-EN.json
and renaming it to you language-code. This setting can be changed while running the bot via the commandlang
.commands
, this is a collection of settings, that limit the SoundFiles, that can be uploaded to the bots server. We suggest to leave them as they are, but you can fiddle with them a bit if you want.
Kellerus uses Puppeteer to retrieve current numbers of the ongoing covid19 pandemic. These numbers are retrieved via puppeteer. Running this bot in Windows is not a problem, running it on Linux or Mac require some mandatory addditional packages to be installed. See the Puppeteer on Linux repository for a detailed explanation and the dependencies that must be installed. If the bot is not working because if puppeteer, it will almost definitly be because of missing or changed dependencies.