A little Discord bot that echoes what you type back to you, using the !ogecho
command. For example, typing: !ogecho write this back to me
should have the bot reply to you write this back to me
in a grey box.
The bot also support the version
command, echoing its version. For example, !ogecho version
should write og-echo-bot: 1.3.0
(the version number 1.3.0
may change).
This is a simple experiment that I made to test deployment at different cloud provider using their serverless or Virtual Machine offerings. The bot is built using Node.js and Typescript and is packed into a Docker container.
- Docker
- Node.js
- Typescript
docker build --rm -f "Dockerfile" -t ogechobot .
# OR add the "no-cache" flag if you are making changes
docker build --rm -f "Dockerfile" -t ogechobot . --no-cache
Make sure you created an .env
file containing the appropriate environment variables, see .env-template
, then:
- (locally)
docker run --env-file ./.env ogechobot
- (host)
docker run --env-file ./.env --restart=always -d "registry.hub.docker.com/carlhugo/ogechobot:1.0.0"
- Change
1.0.0
by the version that you want to run - Make sure to copy the
.env
file on the remote machine
- Change
You can also take a look at the azure-pipelines.yml
which contains the CI/CD pipeline tasks.