GuildScript Documentation
Everything you need to run GuildScript in your server: command reference, plan limits, and a complete guide to writing agents.
Documentation
Introduction
What GuildScript is, who it is for, and the core concepts you need before writing your first agent.
Commands Reference
Every GuildScript slash command: what it does, its options, the permissions it requires, and how plans affect it.
Discord-Only Dashboard
GuildScript is managed entirely inside Discord. There is no web dashboard, and that is a deliberate design decision.
Premium vs Free
A complete comparison of the two GuildScript plans, based on the limits the bot actually enforces.
Scripting Guide
Vibe Coding with AI Agents
How to get AI tools to write working GuildScript agents: what to ask for, what context to provide, and how to fix scripts that do not work.
Lesson 1: Your First Agent
From an empty file to a running agent: the anatomy of an agent, how to upload it, and how to test it.
Lesson 2: Events and Payloads
The 15 events agents can subscribe to, the exact payload shape each one delivers, and how to pick the right one.
Lesson 3: Working with Messages
Reading message content, mentions, and attachments, and acting on messages: reply, react, edit, delete, pin, and bulk operations.
Lesson 4: Members, Roles, and Moderation
Reading member data, assigning roles, sending DMs, and the moderation toolkit: timeout, kick, and ban.
Lesson 5: Channels, Threads, and the Server
Fetching and creating channels, editing channel settings, threads, invites, webhooks, and server-level management.
Lesson 6: Embeds and the discord Module
Importing from the built-in discord module, building embeds, using formatters, and the enums you will reach for most.
Lesson 7: Buttons and Interactions
Posting buttons from one agent and handling clicks in another: the interactionCreate event, custom IDs, and reply modes.
Lesson 8: Select Menus and Modals
Dropdown menus for choices and modal forms for free-text input, plus how to read what the user picked or typed.
Lesson 9: Storing Data with db
Connecting your MongoDB Atlas cluster and using the db helper: insert, find, update, delete, and upserts.
Lesson 10: Database Patterns
Battle-tested shapes for common features: leaderboards, cooldowns, per-server settings, and one-time flags.
Lesson 11: AI in Your Agents (llm)
Connecting Groq, Mistral, or Gemini and calling models from agents with llm.chat: options, limits, and patterns.
Lesson 12: Error Handling, Limits, and Performance
How failures surface in GuildScript, the limits every run lives under, and how to write agents that behave well at the edges.
Lesson 13: Advanced Patterns
Multi-agent features, reaction roles, audit log monitors, webhook loggers, and conventions that keep big setups maintainable.
Differences from discord.js
What carries over from discord.js, what is intentionally different, and a migration mapping for developers who know the library.