Skip to content

A simple Discord.js bot that makes calls to a No-as-a-Service API instance and returns the result in chat.

License

Notifications You must be signed in to change notification settings

claytonfuselier/naas-bot

Repository files navigation

NaaS-Bot (Discord)

Version License
NaaS Response

A Discord bot that delivers rejection-as-a-service via the No-as-a-Service API.

NaaS-Bot listens for the command /naas and then:

  • Gets a rejection reason from the No-as-a-Service API
  • Returns the reason as a styled Discord embed
  • Tags mentioned users, or replies to referenced messages (if applicable)

It's clean, stateless, containerized, and built for quick denials.


🛠 Usage Examples

Scenario Behavior
/naas Replies with a rejection message
/naas @user Tags @user with the rejection message
/naas (as reply) Replies directly to the referenced message
API error Replies with received <status code> from backend api

🚀 Deploy

🐳📥 Docker Pull

Pull and run the container from GitHub Container Registry:

docker pull ghcr.io/claytonfuselier/naas-bot:latest
docker run -e DISCORD_TOKEN=your-discord-bot-token ghcr.io/claytonfuselier/naas-bot:latest

🐳🧩 Docker Compose

Use this sample docker-compose.yml to pull a pre-built image from ghcr.io:

services:
  naas-bot:
    image: ghcr.io/claytonfuselier/naas-bot:latest
    container_name: naas-bot
    environment:
      TZ: "UTC"
      DISCORD_TOKEN: "your-discord-bot-token"
      # Optional - Environment Variables
      #API_URL: "https://naas.debugme.dev/no"
      #SERVICE_LINK: "https://github.com/claytonfuselier/no-as-a-service/"
    restart: unless-stopped

📦🖥️ Run Locally as NPM Package

Run the service without Docker, using NPM

git clone https://github.com/claytonfuselier/naas-bot.git
cd naas-bot/src
npm install
DISCORD_TOKEN=your-discord-bot-token npm start

🧰 Customize Environment

You can configure NaaS-Bot by passing environment variables to the container.

Variable Default Value Required Description
DISCORD_TOKEN Yes The bot token used to authenticate with the Discord API.
API_URL https://naas.debugme.dev/no No The full URL to your No-as-a-Service API endpoint.
SERVICE_LINK https://github.com/claytonfuselier/no-as-a-service/ No Link displayed in embed footer; branding for No-as-a-Service.
TZ UTC No Timezone for all time-based operations and logs.

👤 Authors

Written while ignoring real responsibilities, by claytonfuselier


📄 License

This project is open source and available under the MIT License.


© NaaS-Bot. Just kidding, we are not a real company. Don’t sue us.

About

A simple Discord.js bot that makes calls to a No-as-a-Service API instance and returns the result in chat.

Resources

License

Stars

Watchers

Forks

Packages