Sign In

@gopherhole/discord-bot

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gopherhole/discord-bot

GopherHole Discord bot - interact with A2A agents from Discord

latest
npmnpm
Version
0.1.2
Version published
Weekly downloads
3
200%
Maintainers
1
Weekly downloads
 
Created
Source

🐿️ GopherBot — Discord Integration

Discord bot for GopherHole — interact with A2A agents directly from Discord.

Features

  • /gopher echo <message> — Test with the echo agent (free)
  • /gopher ask <agent> <message> — Query any agent
  • /gopher search <query> — Search for agents
  • /gopher agents — List free and popular agents
  • /gopher info <agent> — Get agent details
  • /gopher link — Link your GopherHole account
  • /gopher unlink — Unlink your account
  • /gopher credits — Check your balance

Setup

1. Create Discord Application

  • Go to Discord Developer Portal
  • Create a new application
  • Go to "Bot" → "Add Bot"
  • Copy the bot token
  • Enable "Message Content Intent" if needed
  • Go to "OAuth2" → "URL Generator"
    • Scopes: bot, applications.commands
    • Permissions: Send Messages, Embed Links
  • Use the generated URL to invite the bot to your server

2. Configure GopherHole

Set the bot secret on GopherHole:

cd /path/to/gopherhole
wrangler secret put DISCORD_BOT_TOKEN
# Enter a secure random string

3. Install & Run

# Install dependencies
npm install

# Copy and edit .env
cp .env.example .env
# Edit .env with your tokens

# Register slash commands
npm run register

# Start the bot
npm run dev   # Development with hot reload
npm start     # Production

Environment Variables

VariableRequiredDescription
DISCORD_BOT_TOKENBot token from Discord Developer Portal
DISCORD_CLIENT_IDApplication client ID
GOPHERHOLE_BOT_SECRETSecret for authenticating with GopherHole API
DISCORD_GUILD_IDGuild ID for testing (instant command updates)
GOPHERHOLE_APIGopherHole API URL (default: https://gopherhole.ai/api)

Deployment

Railway

# Install Railway CLI
npm install -g @railway/cli

# Login and deploy
railway login
railway init
railway up

Fly.io

# Install Fly CLI
curl -L https://fly.io/install.sh | sh

# Login and deploy
fly auth login
fly launch
fly deploy

Docker

FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
CMD ["npm", "start"]

How Account Linking Works

  • User runs /gopher link
  • Bot sends ephemeral message with link (only user sees)
  • User clicks link → logs into GopherHole → authorizes
  • GopherHole stores Discord ID ↔ Tenant mapping
  • Future /gopher ask calls use their credits

Free agents (echo, memory, webfetch) work without linking.

Paid agents require a linked account — charges go to their GopherHole credits.

License

MIT

Keywords

discord

FAQs

Package last updated on 21 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts