From 38f2db30dd7bfdc85d13705055add895611d1299 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 6 Dec 2025 16:05:25 -0700 Subject: [PATCH] Add warning about safe-terminating when the query method returns null --- Query-Manager.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Query-Manager.md b/Query-Manager.md index 92c3642..ab81df4 100644 --- a/Query-Manager.md +++ b/Query-Manager.md @@ -21,13 +21,15 @@ query data prior to being returned. ### `QueryManager.query` > QueryManager.query(request: [AskConfig](Dialog-Manager.md#askconfig), options: [QueryOptions](#queryoptions)): Promise<[QueryResponse](#queryresponse)|null> -This is the powerhouse of the Query Manager API, this is how you actually -prompt other users for information and do stuff with that information. +This is the powerhouse of the Query Manager API, this is how you actually prompt other users for information and do stuff with that information. The `request` parameter utilizes the same type as the [Dialog Manager's AskConfig](Dialog-Manager.md#askconfig), please consult that documentation for further information. If you want to perform some operation on the data returned on a per-user basis as it arrives, you should provide the `options` an `onSubmit` event listener which will be called with each user's submitted data. +> [!WARNING] +> You should safely stop execution when the returned Promise resolves to `null`, as that means the request was cancelled or there was one already waiting with the provided ID. + > [!NOTE] > You can disable the status application by providing `showStatusApp: false` as an option. However, by doing so, will change when the Promise returned from this method is resolved.