Skip to main content
The Tuteliq Discord bot monitors text channels for grooming, bullying, and unsafe content in real time using the Tuteliq API. Add the hosted bot with one click or self-host on your own infrastructure.

Installation

Click the Add to Discord link above to invite the bot. No code required — configure everything with slash commands. The bot needs the following permissions:
  • Send Messages
  • Embed Links
  • Read Message History
  • Manage Messages
  • Moderate Members
Make sure Message Content Intent is enabled for the bot application.

Self-host

git clone https://github.com/Tuteliq/discord.git
cd discord
npm install
cp .env.example .env
# Fill in your values (see Self-Hosting section below)
npm run deploy:commands
npm run build
npm start

Quick start

1

Configure your API key

Run /tuteliq setup and enter your Tuteliq API key (starts with tq_). The key is encrypted at rest with AES-256.
2

Add channels to monitor

Run /tuteliq monitor add #channel for each text channel you want to protect.
3

Set the alert channel

Run /tuteliq alerts channel #admin-alerts to choose where safety alerts are posted.

How it works

Messages in monitored channels flow through a multi-stage pipeline:
  1. Collect — Each message is added to a per-channel sliding window buffer.
  2. Batch analyze — The buffer is periodically flushed and sent to the Tuteliq API, which detects bullying, grooming, unsafe content, and emotional distress.
  3. Alert — When a risk score exceeds your sensitivity threshold, a rich embed is posted to the alert channel with severity, risk score, message excerpt, and recommended action.
  4. Act — Admins take action directly from the alert embed using interactive buttons.

Slash commands

All commands live under the /tuteliq prefix and require Administrator or Manage Server permission.
CommandDescription
/tuteliq setupConfigure the bot with your Tuteliq API key
/tuteliq monitor add #channelStart monitoring a text channel
/tuteliq monitor remove #channelStop monitoring a channel
/tuteliq monitor listList all monitored channels
/tuteliq alerts channel #channelSet the channel for safety alerts
/tuteliq alerts dm enable/disableToggle admin DM notifications for high/critical threats
/tuteliq alerts testSend a test alert to verify setup
/tuteliq sensitivity set <level>Set detection sensitivity
/tuteliq sensitivity viewView current sensitivity settings and thresholds
/tuteliq statusView bot status, rate limits, and quota usage
/tuteliq linkGenerate a parent link code (expires in 15 minutes)
/tuteliq resetRemove all Tuteliq configuration from the server

Alert actions

When a threat is detected, the alert embed includes interactive buttons:
ActionEffect
Delete MessageRemoves the flagged message from the channel
Timeout UserTemporarily mutes the user server-wide
View Full ReportOpens the detailed analysis with rationale and context
DismissCloses the alert without action
Admins with DM notifications enabled also receive a direct message for high and critical severity threats.

Sensitivity levels

LevelThresholdBest for
low70%+Minimal alerts, only clear violations
medium50%+Balanced — good default for most servers
high30%+Stricter monitoring, catches more subtle threats
maximum10%+Maximum protection — useful for testing or high-risk communities
Set the level with /tuteliq sensitivity set <level>.

Parent linking

The /tuteliq link command generates a one-time code that parents can enter in the Tuteliq mobile app to receive notifications when their child is involved in a flagged conversation. Link codes expire after 15 minutes.

Self-hosting

Requirements

  • Node.js 20+
  • Discord bot application with Message Content Intent enabled
  • Tuteliq API key
  • Firebase project with Firestore enabled
  • Firebase service account key (JSON)

Environment variables

# Discord Bot
DISCORD_TOKEN=your-bot-token
DISCORD_CLIENT_ID=your-client-id

# Tuteliq API
TUTELIQ_API_URL=https://api.tuteliq.ai

# Encryption (generate with: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))")
ENCRYPTION_KEY=your-64-hex-char-encryption-key

# Firebase
GOOGLE_APPLICATION_CREDENTIALS=./service-account.json

# Server
PORT=8080
NODE_ENV=production
LOG_LEVEL=info

Docker

docker compose up -d

Cloud Run

gcloud builds submit --config=discord/cloudbuild.yaml .

Health check

The bot exposes a health endpoint at GET /health on the configured port (default 8080). It returns 200 when the bot is connected to Discord.

Next steps