Skip to content

Commit 6c466a5

Browse files
authored
Merge pull request #61 from Roll20/dispatch-query-correction
Add { } to documentation
2 parents a47f351 + c946d7f commit 6c466a5

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

content/docs/components/dispatch.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ This function returns an object containing:
124124

125125
#### query
126126
```javascript
127-
dispatch.query(options: Swal2Options): {
127+
dispatch.query({
128+
options: Swal2Options
129+
}): {
128130
isConfirmed: boolean,
129131
isDenied: boolean,
130132
isDismissed: boolean,

public/docs/components/dispatch/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
</span></span><span class=line><span class=cl> <span class=nx>whisper</span><span class=o>?:</span> <span class=s1>&#39;gm&#39;</span><span class=p>,</span>
2626
</span></span><span class=line><span class=cl> <span class=nx>secret</span><span class=o>?:</span> <span class=kr>boolean</span><span class=p>,</span>
2727
</span></span><span class=line><span class=cl> <span class=p>}</span>
28-
</span></span><span class=line><span class=cl><span class=p>})</span><span class=o>:</span> <span class=nb>Promise</span><span class=o>&lt;</span><span class=nx>string</span><span class=o>&gt;</span></span></span></code></pre></div></figure></div><p><code>post</code> posts a message to chat, either creating a new message or overwriting an existing one. It requires a character id and message content, a string containing either plain text or HTML to be posted.</p><p>The method also accepts an options object. Currently, only whisper and secret are supported, the only valid value for whisper is gm, which will send the message as a whisper to the gm.</p><p>The secret option is ignored unless whisper is also set, toggling to true will cause the message to not be visible to the controlling player.</p><p>Like roll, messageId can be provided to update an existing chat message, but if omitted the method will generate a new messageId and post a new chat message. The method returns the messageId.</p><h4 id=query>query<a href=#query class=anchor aria-hidden=true>#</a></h4><div class=expressive-code><figure class="frame not-content"><figcaption class=header><span class=title></span></figcaption><div class=highlight><pre tabindex=0 class=chroma><code class=language-javascript data-lang=javascript><span class=line><span class=cl><span class=nx>dispatch</span><span class=p>.</span><span class=nx>query</span><span class=p>(</span><span class=nx>options</span><span class=o>:</span> <span class=nx>Swal2Options</span><span class=p>)</span><span class=o>:</span> <span class=p>{</span>
28+
</span></span><span class=line><span class=cl><span class=p>})</span><span class=o>:</span> <span class=nb>Promise</span><span class=o>&lt;</span><span class=nx>string</span><span class=o>&gt;</span></span></span></code></pre></div></figure></div><p><code>post</code> posts a message to chat, either creating a new message or overwriting an existing one. It requires a character id and message content, a string containing either plain text or HTML to be posted.</p><p>The method also accepts an options object. Currently, only whisper and secret are supported, the only valid value for whisper is gm, which will send the message as a whisper to the gm.</p><p>The secret option is ignored unless whisper is also set, toggling to true will cause the message to not be visible to the controlling player.</p><p>Like roll, messageId can be provided to update an existing chat message, but if omitted the method will generate a new messageId and post a new chat message. The method returns the messageId.</p><h4 id=query>query<a href=#query class=anchor aria-hidden=true>#</a></h4><div class=expressive-code><figure class="frame not-content"><figcaption class=header><span class=title></span></figcaption><div class=highlight><pre tabindex=0 class=chroma><code class=language-javascript data-lang=javascript><span class=line><span class=cl><span class=nx>dispatch</span><span class=p>.</span><span class=nx>query</span><span class=p>({</span><span class=nx>options</span><span class=o>:</span> <span class=nx>Swal2Options</span><span class=p>})</span><span class=o>:</span> <span class=p>{</span>
2929
</span></span><span class=line><span class=cl> <span class=nx>isConfirmed</span><span class=o>:</span> <span class=kr>boolean</span><span class=p>,</span>
3030
</span></span><span class=line><span class=cl> <span class=nx>isDenied</span><span class=o>:</span> <span class=kr>boolean</span><span class=p>,</span>
3131
</span></span><span class=line><span class=cl> <span class=nx>isDismissed</span><span class=o>:</span> <span class=kr>boolean</span><span class=p>,</span>
@@ -119,4 +119,4 @@
119119
</span></span><span class=line><span class=cl> <span class=nx>args</span><span class=o>:</span> <span class=p>{</span>
120120
</span></span><span class=line><span class=cl> <span class=nx>urlString</span><span class=o>:</span> <span class=nx>string</span>
121121
</span></span><span class=line><span class=cl> <span class=p>}</span>
122-
</span></span><span class=line><span class=cl><span class=p>})</span><span class=o>:</span> <span class=k>void</span></span></span></code></pre></div></figure></div><p><code>openDialogFromLink</code> opens the supplied urlString through the Roll20 Tabletop.</p><ul><li>If the url is for a handout, it will open the corresponding handout in the campaign. This will also check if the user opening the link has access to the handout.</li><li>If the url is for a compendium, it will open a pop up to the compendium page, it will also check to ensure the user has access to view the page.</li><li>If the url is for an external page, a confirmation pop up will display to warn the user that the link is for an external site and open a new tab in their main window if confirmed.</li></ul><div class="page-footer-meta d-flex flex-column flex-md-row justify-content-between"></div><div class="page-nav d-flex flex-column flex-sm-row"><div class="card w-100"><div class="card-body d-flex"><div class="d-flex flex-column justify-content-center"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-arrow-left" width="20" height="20" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12h14"/><path d="M5 12l6 6"/><path d="M5 12l6-6"/></svg></div><div class="d-flex flex-column"><div class=text-body-secondary>Prev</div><a href=/beacon-docs/docs/components/rolls/ class="stretched-link text-reset text-decoration-none">Rolls</a></div></div></div><div class=m-2></div><div class="card text-end w-100"><div class="card-body d-flex justify-content-end"><div class="d-flex flex-column"><div class=text-body-secondary>Next</div><a href=/beacon-docs/docs/components/custom-sheet-macro-attributes/ class="stretched-link text-reset text-decoration-none">Custom Sheet Macro Attributes</a></div><div class="d-flex flex-column justify-content-center"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-arrow-right" width="20" height="20" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12h14"/><path d="M13 18l6-6"/><path d="M13 6l6 6"/></svg></div></div></div></div></main></div></div></div><footer class="footer text-muted"><div class=container-lg><div class=row><div class="col-lg-8 text-center text-lg-start"><ul class=list-inline><li class=list-inline-item><a class=text-muted href=https://help.roll20.net/hc/en-us/articles/360037770793-Terms-of-Service-and-Privacy-Policy>Privacy Policy</a></li></ul></div><div class="col-lg-8 text-center text-lg-end"><ul class=list-inline><li class=list-inline-item>Brought to you by <a class=text-muted href=https://gethyas.com/>Hyas</a></li></ul></div></div></div></footer><script async src=/beacon-docs/js/app.47b84f3b640408af6efe7bf4add1a36f5b9c6227fbae7b8bcdf0c9ce42fefc54.js integrity="sha256-R7hPO2QECK9u/nv0rdGjb1ucYif7rnuLzfDJzkL+/FQ="></script><script async src=/beacon-docs/js/flexsearch.cbed95db83d6f8f9987a1bdb82f63e3ccb7eb8d23211108395cb25ccca82e5b4.js integrity="sha256-y+2V24PW+PmYehvbgvY+PMt+uNIyERCDlcslzMqC5bQ="></script><script async src=/beacon-docs/js/search-modal.4e30271fef6fac86c3b4143167e9784bd3f7037ce1045d03a321e7e799e91476.js integrity="sha256-TjAnH+9vrIbDtBQxZ+l4S9P3A3zhBF0DoyHn55npFHY="></script><div class="d-inline-flex fixed-bottom-right pb-4 pe-4"><button id=toTop type=button class="btn btn-primary rounded-circle ms-auto p-2"><span class=visually-hidden>Top</span><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-chevron-up" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 15l6-6 6 6"/></svg></button></div></body></html>
122+
</span></span><span class=line><span class=cl><span class=p>})</span><span class=o>:</span> <span class=k>void</span></span></span></code></pre></div></figure></div><p><code>openDialogFromLink</code> opens the supplied urlString through the Roll20 Tabletop.</p><ul><li>If the url is for a handout, it will open the corresponding handout in the campaign. This will also check if the user opening the link has access to the handout.</li><li>If the url is for a compendium, it will open a pop up to the compendium page, it will also check to ensure the user has access to view the page.</li><li>If the url is for an external page, a confirmation pop up will display to warn the user that the link is for an external site and open a new tab in their main window if confirmed.</li></ul><div class="page-footer-meta d-flex flex-column flex-md-row justify-content-between"></div><div class="page-nav d-flex flex-column flex-sm-row"><div class="card w-100"><div class="card-body d-flex"><div class="d-flex flex-column justify-content-center"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-arrow-left" width="20" height="20" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12h14"/><path d="M5 12l6 6"/><path d="M5 12l6-6"/></svg></div><div class="d-flex flex-column"><div class=text-body-secondary>Prev</div><a href=/beacon-docs/docs/components/rolls/ class="stretched-link text-reset text-decoration-none">Rolls</a></div></div></div><div class=m-2></div><div class="card text-end w-100"><div class="card-body d-flex justify-content-end"><div class="d-flex flex-column"><div class=text-body-secondary>Next</div><a href=/beacon-docs/docs/components/custom-sheet-macro-attributes/ class="stretched-link text-reset text-decoration-none">Custom Sheet Macro Attributes</a></div><div class="d-flex flex-column justify-content-center"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-arrow-right" width="20" height="20" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12h14"/><path d="M13 18l6-6"/><path d="M13 6l6 6"/></svg></div></div></div></div></main></div></div></div><footer class="footer text-muted"><div class=container-lg><div class=row><div class="col-lg-8 text-center text-lg-start"><ul class=list-inline><li class=list-inline-item><a class=text-muted href=https://help.roll20.net/hc/en-us/articles/360037770793-Terms-of-Service-and-Privacy-Policy>Privacy Policy</a></li></ul></div><div class="col-lg-8 text-center text-lg-end"><ul class=list-inline><li class=list-inline-item>Brought to you by <a class=text-muted href=https://gethyas.com/>Hyas</a></li></ul></div></div></div></footer><script async src=/beacon-docs/js/app.47b84f3b640408af6efe7bf4add1a36f5b9c6227fbae7b8bcdf0c9ce42fefc54.js integrity="sha256-R7hPO2QECK9u/nv0rdGjb1ucYif7rnuLzfDJzkL+/FQ="></script><script async src=/beacon-docs/js/flexsearch.cbed95db83d6f8f9987a1bdb82f63e3ccb7eb8d23211108395cb25ccca82e5b4.js integrity="sha256-y+2V24PW+PmYehvbgvY+PMt+uNIyERCDlcslzMqC5bQ="></script><script async src=/beacon-docs/js/search-modal.4e30271fef6fac86c3b4143167e9784bd3f7037ce1045d03a321e7e799e91476.js integrity="sha256-TjAnH+9vrIbDtBQxZ+l4S9P3A3zhBF0DoyHn55npFHY="></script><div class="d-inline-flex fixed-bottom-right pb-4 pe-4"><button id=toTop type=button class="btn btn-primary rounded-circle ms-auto p-2"><span class=visually-hidden>Top</span><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-chevron-up" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentcolor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 15l6-6 6 6"/></svg></button></div></body></html>

0 commit comments

Comments
 (0)