Your friendly neighbourhood Discord Bot.
Go to this site and click Add to Server
.
- Install [nodejs], Botomir requires v12 or higher.
- Install Docker on your system
- Start up a [mongodb] database
$ docker run -p 27017:27017 -it -d --name mongo -e MONGO_INITDB_ROOT_USERNAME=admin -e MONGO_INITDB_ROOT_PASSWORD=pass mongo
- Create the botomir user and grant them permissions on the database
$ docker exec -it mongo bash
> mongo -u admin -p
> use admin
> db.createUser({
user: "bot_account",
pwd: "bot_test_pass",
roles: [ { role: "readWrite", db: "discordbot" } ]
})
- Create a discord bot application on https://discord.com/developers/applications
- collect the client ID, client secret, and application token
- Create a spotify application on https://developer.spotify.com/dashboard/applications
- collect the client ID, and client secret
- Copy the
template.env
file to.env
, and set all of the values for those fields. - Install all of the node modules
npm ci
- Start the application for development
npm run dev
$ docker build \
--build-arg VCS_REF=$(git rev-parse -q --verify HEAD) \
--build-arg BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
-t botomir .
To run Botomir using the provided docker-compose
file some environment variables need to be set first in the .env
file.
A template of this file is provided in the compose.env
file.
Then run docker compose up -d
to start the database and the botomir application.
Or you can start only the botomir container with the following command. Be sure to set all of the required environment variables.
$ docker run -p 80:8300 \
-e DISCORD_TOKEN=token \
.... \
--name botomir \
marshallasch/botomir
The Botomir Docker container can be stopped using the SIGTERM
signal:
$ docker kill -s SIGTERM <container name>
- manage server
- change nickname
- manage nicknames
- view channels
- send Messages
- embedded Links
- read message history
In order to use any of the bot configuration commands you must have the role botomir-admin
assigned to you.
- Use
command-prompt
+help
to view all commands. - To add a new command you add the command to
lib/commands/botCommands.js
and a corresponding module.
- You can add functionality for reactions to specified messages under
lib/reactions/botReactions.js
and a corresponding module.
- Each message will be written to MongoDB. Data includes server, channel, author, content, timestamp, and message id.
- Each Spotify track that is sent to the
DISCORD_MUSIC_CHANNEL_ID
will be stored in the database. - An authenticate token database will also be maintained for Spotify access tokens.
- You can specify a different schema or database under
lib/database
.
- This app is deployed to the hobby tier of Heroku. Available 24/7.
- You can specify a string for the command prompt.
- For the weather command, you can specify a default city and temperature unit.
- You can specify the Spotify playlist name (the date will get added to the end still) and the playlist description text.
- You can add privileged roles for which the bot cannot add/remove.
Requires following role permissions
- Manage server
- Manage roles
- Manage channels
- Manage nicknames
- Send messages
- Manage messages
- Embed Links
- Attach files
- Read message history
- Add reactions
If you have any questions/requests please feel free to create a new issue.