Skip to content

aarace/vestabot-discord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vestabot (Discord)

A Discord bot that lets anyone in your server post messages to a Vestaboard using the /vesta slash command. Each user is limited to one post per minute.

Prerequisites

Installation

  1. Clone the repository and install dependencies:

    git clone <your-repo-url>
    cd vestabot-discord
    npm install
  2. Copy .env.example to .env and fill in your credentials:

    cp .env.example .env
    Variable Where to find it
    DISCORD_TOKEN Discord Developer Portal → your app → Bot → Token
    DISCORD_CLIENT_ID Discord Developer Portal → your app → General Information → Application ID
    VESTABOARD_TOKEN Vestaboard app → Settings → Developer → Read/Write API token
  3. Invite the bot to your server:

    • Go to your app in the Discord Developer Portal
    • Navigate to OAuth2 → URL Generator
    • Select scopes: bot and applications.commands
    • Select bot permission: Send Messages
    • Open the generated URL and authorize the bot to your server

Running in a console (for testing)

node index.js

You should see:

Slash command /vesta registered.
Logged in as YourBot#1234

Use /vesta <message> in any channel to post to the Vestaboard.

Running in Docker

Build the image:

docker build -t vestabot-discord .

Start the container (runs in the background, restarts automatically):

docker run -d --restart unless-stopped --env-file .env --name vestabot-discord vestabot-discord

Rebuild after code changes:

docker build -t vestabot-discord . && docker rm -f vestabot-discord && docker run -d --restart unless-stopped --env-file .env --name vestabot-discord vestabot-discord

Other useful commands:

docker logs vestabot-discord       # view logs / errors
docker restart vestabot-discord    # restart the container
docker stop vestabot-discord       # stop the container

About

A discord bot in nodejs to allow users in my discord server to post messages to my vestaboard

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Contributors