My first Discord bot with serenity. The code is from serenity's examples.
It responds to ping
messages (on all channels) with pong
. Nothing more, it's
already quite impressive!
-
Create a bot (and its Discord token) in the Discord Developer Portal, then add the bot to a Discord server. Follow this guide for details.
-
Run the bot with Docker:
docker pull danymarcoux/discord-ping-pong-bot:latest
docker run --detach --restart always --env DISCORD_TOKEN=YOUR_DISCORD_TOKEN danymarcoux/discord-ping-pong-bot:latest
-
Create an access token for Docker Hub
-
Login to the Docker Hub registry with the access token (it will prompt...):
docker login --username danymarcoux
- Build Docker image and tag it:
docker build --tag danymarcoux/discord-ping-pong-bot:latest .
- Publish Docker image to Docker Hub registry:
docker push danymarcoux/discord-ping-pong-bot:latest