Skip to content

MilanJzo/discord-ipbot

 
 

Repository files navigation

Discord IP Bot

A simple Discord bot that provides server information through slash commands.

Note

This bot appears "offline" in Discord because it uses HTTP interactions rather than a persistent Gateway connection. It will still respond to slash commands normally.

Features

  • /test - Basic test command that responds with "hello world"
  • /about - Information about the bot, its purpose, features, and technology stack
  • /version - Displays the bot version, Node.js version, platform, OS release
  • /stats - View bot statistics and performance metrics
  • /serverip - Get the public IP address of the server this bot is running on

Create a Discord Application and Bot

Create a Discord application and bot via the Discord Developer Portal and invite it to your server.

The bot requires the following OAuth2 scopes:

  • bot
  • applications.commands

The bot requires the following permissions:

  • Send Messages
  • Use Slash Commands

Setup the Backend

  1. Download the Docker image from Releases

  2. Load the image:

docker load -i discord-ipbot-image.tar
  1. Create a .env file with the following variables:
APP_ID=your_app_id_here
DISCORD_TOKEN=your_bot_token_here
PUBLIC_KEY=your_public_key_here
  1. Run the image:
docker run -d -p 3000:3000 --env-file <path_to_your_env_file> discord-ipbot:latest
  1. Connect your Backend to the Application: Expose your local server to the internet. And then point the "Interactions Endpoint URL" in the Discord Developer Portal under "General Information" to your Server (e.g., https://your-domain-goes-here/interactions).

About

Basic Discord app with examples

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 91.9%
  • Dockerfile 8.1%