📄️ Menus & Sessions
Understanding the relationship between menus and sessions is the foundation of working with FlowCord. Everything else — state, navigation, lifecycle hooks, components — builds on these two concepts.
📄️ Menu Context
Every callback in FlowCord — setup, setEmbeds, setButtons, onEnter, action handlers, and all other hooks — receives a context object (ctx). It is the single interface through which your code interacts with the running session.
📄️ Render Modes
Every FlowCord menu renders in one of two modes: embeds mode or layout mode. The choice is made per menu and is mutually exclusive — you can't mix the two within a single menu definition.
📄️ Navigation
FlowCord's navigation system lets users move between menus within a session using a LIFO (last-in, first-out) stack. This page covers how to navigate between menus, how history tracking works, and when to use built-in action factories vs inline callbacks.
📄️ State Management
FlowCord provides two distinct state containers, each with a different scope and lifetime. Understanding which to use — and when — is key to building menus that behave correctly.
📄️ Lifecycle Hooks
FlowCord exposes hooks at every meaningful stage of a menu session. All hooks receive ctx as their only argument and can be sync or async — they are awaited sequentially.