How keyauth/keyauth-discord-bot works
This is a Discord slash-command bot for managing KeyAuth applications through the Seller API. A user invokes a command in Discord; the runtime resolves and executes it, and command handlers return results to Discord. The command surface covers licensing, users, application settings, subscriptions, files, chats, and operational features such as sessions and webhooks. Sampled handlers show local storage of seller keys and direct Seller API requests. Some command directories were not sampled, so their internal calls and API relationships are not inferred.
Main entry points: index.js Command runtime · database.js Local database · Users User commands · Webhooks Webhook commands
Components 21
Bot runtime
- Command runtime
index.js - Bot configuration
utils/config.js - Local database
utils/database.js
Licensing and accounts
- License commands
commands/Licenses - User commands
commands/Users - Subscription commands
commands/Subscriptions
Application management
- Application settings
commands/Settings - Reseller accounts
commands/ResellerAndManager - Variable commands
commands/Variables
Application resources
- File commands
commands/Files - Chat commands
commands/Chats - Blacklist commands
commands/Blacklists - Whitelist commands
commands/Whitelists - Fetch and stats
commands/Utilies/Fetch.js
Operations and integrations
- Webhook commands
commands/Webhooks - Session commands
commands/Sessions - Log commands
commands/Logs - Web loader buttons
commands/WebLoader
Other components
- Discord user
- Discord platform
- KeyAuth Seller API
Connections 22
- Discord user → Discord platform: invokes commands
README.md - Discord platform → Command runtime: delivers interactions
index.js - Command runtime → Discord platform: registers commands
index.js - Command runtime → Bot configuration: loads settings
index.js - Command runtime → Local database: reads and writes
index.js - Command runtime → License commands: dispatches commands
index.js - Command runtime → User commands: dispatches commands
index.js - Command runtime → Application settings: dispatches commands
index.js - Command runtime → Webhook commands: dispatches commands
index.js - Command runtime → Local database: stores seller keys
index.js - Webhook commands → Local database: reads seller key
commands/Webhooks/CreateWebhook.js - File commands → Local database: reads seller key
commands/Files/RetrieveFile.js - User commands → Local database: reads seller key
commands/Users/RetrieveVariable.js - Variable commands → Local database: reads seller key
commands/Variables/RetrieveVariableByName.js - Fetch and stats → Local database: reads seller key
commands/Utilies/Fetch.js - Session commands → Local database: reads seller key
commands/Sessions/KillSession.js - Webhook commands → KeyAuth Seller API: manages webhooks
commands/Webhooks/CreateWebhook.js - File commands → KeyAuth Seller API: retrieves files
commands/Files/RetrieveFile.js - User commands → KeyAuth Seller API: retrieves variables
commands/Users/RetrieveVariable.js - Variable commands → KeyAuth Seller API: retrieves variables
commands/Variables/RetrieveVariableByName.js - Fetch and stats → KeyAuth Seller API: fetches resources
commands/Utilies/Fetch.js - Session commands → KeyAuth Seller API: ends sessions
commands/Sessions/KillSession.js