A simple ShrikeBot clone made in JavaScript!
A ShrikeBot clone made in JavaScript!
A simple ShrikeBot clone made in JavaScript!
This project has been developed on a Linux system. To learn more about the system, visit the Dotfiles repository.
/
├── dashboard/
│ ├── public/
│ │ ├── index.html
│ │ ├── script.js
│ │ └── style.css
│ ├── routes/
│ │ ├── api.js
│ │ ├── logs.js
│ │ └── metrics.js
│ ├── utils/
│ │ ├── format.js
│ │ └── logs.js
│ └── index.js
├── docs/
| └── *.md
├── src/
│ ├── assets/
│ │ ├── backup/
│ │ │ └── ...
│ │ └── commands.pdf
│ ├── commands/
│ │ └── */
│ │ └── *.js
│ ├── events/
│ │ ├── interactionCreate.js
│ │ ├── messageCreate.js
│ │ └── ready.js
│ ├── utils/
│ │ └── emoji.js
│ ├── config.json
│ ├── deploy-commands.js
│ └── index.js
├── CONTRIBUTING
├── LICENSE
├── .dockerignore
├── .npmignore
├── .npmrc
├── docker-compose.yaml
├── Dockerfile
├── eslint.config.js
├── package-lock.json
└── package.json
Open a terminal in the directory where you store your repositories and clone it with the following command:
# HTTPS
git clone https://github.com/FJrodafo/ShrikeBot.git
cd ShrikeBot/
# SSH
git clone git@github.com:FJrodafo/ShrikeBot.git
cd ShrikeBot/
This project needs a config.json into the src/ directory with some data related to your Discord server and your APP token (Make sure you have an APP created in the Discord Developer Portal):
cp src/config.example.json src/config.json
nano src/config.json
This project must be initialized and the necessary dependencies installed with the following command:
npm i
If you have the config.json file into the src/ directory correctly configured and Node v24.x installed on your machine, then you are good to go!
To check if you already have Node installed on your machine, run node -v in your terminal. Otherwise, you will need to install Node v24.x or higher or, as a last option, check out the Docker alternative.
Finally, if you have Node installed, run the following command to activate ShrikeBot:
npm start
# Press 'Ctrl + C' to exit
Open Discord and access the server where ShrikeBot is located to see the result.
You can find a Docker image of this project ready to be pulled on GitHub Packages or Docker Hub official website!
Pull the latest image with the following commands:
# GitHub Packages
docker pull ghcr.io/fjrodafo/shrike-bot:latest
# Docker Hub
docker pull fjrodafo/shrike-bot:latest
[!IMPORTANT]
Please note that when using Docker, port 3000 on localhost will be occupied by ShrikeBot for its proper functioning.
If you already have applications that use port 3000, don’t worry, the dashboard uses the @fjrodafo/port-finder library, which will always search for a free port to run the application without any problems.
Make sure to create the config.json file into the src/ directory before continuing (This file is used only at runtime, is ignored by Git and Docker, and is not included in the image).
Build the container:
docker compose build
[!NOTE]
If you want to build the image locally, uncomment the
buildsection indocker-compose.yamland rundocker compose build. Otherwise, skip directly to the next step.
Run the container:
docker compose up -d
Check the container logs:
docker logs -f shrike-bot
Stop the Container:
docker compose down
If you prefer not to use Docker Compose, you can build and run the image manually.
If you don’t have Node v24.x or higher installed on your machine, you can build a Docker image by running the Dockerfile (Make sure to create and configure the config.json file correctly into the src/ directory before building the docker image).
Open a terminal and run the following command:
docker build -t shrike-bot:latest .
After the build completes, run the image inside a container with the following command:
docker run -dp 127.0.0.1:3000:3000 \
-v $(pwd)/src/config.json:/app/src/config.json:ro \
shrike-bot:latest
Check the container logs:
docker ps -a
docker logs -f <container_id>
Stop and remove the Container:
docker stop <container_id>
docker rm <container_id>
docker build \
-t ghcr.io/fjrodafo/shrike-bot:1 \
-t ghcr.io/fjrodafo/shrike-bot:1.0 \
-t ghcr.io/fjrodafo/shrike-bot:1.0.0 \
-t ghcr.io/fjrodafo/shrike-bot:latest \
-t fjrodafo/shrike-bot:1.0.0 \
-t fjrodafo/shrike-bot:latest \
.
docker push ghcr.io/fjrodafo/shrike-bot:1
docker push ghcr.io/fjrodafo/shrike-bot:1.0
docker push ghcr.io/fjrodafo/shrike-bot:1.0.0
docker push ghcr.io/fjrodafo/shrike-bot:latest
docker push fjrodafo/shrike-bot:1.0.0
docker push fjrodafo/shrike-bot:latest
In the project directory, you can run:
npm startOnce configured, run the APP. It first deploy the commands, updating both on the guild server and globally (You can edit the commented lines of code in the deploy-commands.js file to customize the deploy of the APP commands).
npm run canaryOnce configured, run a Canary version of the APP. It works exactly the same as the main APP. This version is intended to test new commands and experimental implementations to ensure they work before publishing changes, preventing any bugs that may cause malfunctions.
npm run eslintRuns the eslint to find possible formatting errors in the code.
npm run eslintfixAutomatically fixes all errors caught by eslint.
npm testThere are currently no tests configured.
npm run tarballSimulates packaging a project into a .tgz archive (as if preparing it for distribution) without actually generating the file.
If you want to see an example project built by following the Discordjs guide, check out the DiscordAPP repository.
Discordjs · Docs · Guide · GitHub
Thanks to the Discordjs team for creating an amazing library and making Discord APP development easier!
Thanks to Syraleaf for sharing the commands.pdf file with a list of each and every command from the original ShrikeBot.