Skip to main content
These examples use the window and tab from Getting started.

Show a message

Kinds: info, success, warning, error. Duration is in seconds. The returned notification has Dismiss() and Destroy().

Ask for confirmation

The callback runs only after confirmation. Cancel does not run it. Confirm returns false if another confirmation is open.

Register a searchable command

Keep the visible button for touch users. On desktop, Ctrl+K attempts to open the palette; your environment may intercept it. Use arrows and Enter, mouse or touch to activate results. CloseCommands() closes the palette; RemoveCommand("show_status") removes a command. window:PromptDiscord(urlOrOptions) opens an invite dialog using your supplied URL. Alternatively, pass DiscordPrompt when creating the window. It is disabled by default and never joins a server automatically. Use a real invitation for your project.