Skip to content

Commit 02c9ad8

Browse files
committed
reference/functions: document return value for exec and execAdmin
Closes #89 Signed-off-by: Luca Zeuch <[email protected]>
1 parent c1a1e49 commit 02c9ad8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

content/docs/reference/templates/functions.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2304,10 +2304,12 @@ Creates a dictionary from the provided key-value pairs. The number of parameters
23042304
#### execAdmin
23052305

23062306
```yag
2307-
{{ execAdmin "command" [args...] }}
2307+
{{ $resp := execAdmin "command" [args...] }}
23082308
```
23092309

2310-
Runs the given command with the provided (optional) arguments as the bot.
2310+
Runs the given command with the provided (optional) arguments as the bot and returns the response.
2311+
2312+
This will not work for commands which have their response marked as a manual response, i.e. `wouldyourather` and `poll`.
23112313

23122314
#### execTemplate
23132315

@@ -2321,12 +2323,12 @@ Executes the associated `"template"` template, optionally with data. Please see
23212323
#### exec
23222324

23232325
```yag
2324-
{{ exec "command" [args...] }}
2326+
{{ $resp := exec "command" [args...] }}
23252327
```
23262328

2327-
Executes the given command with the provided (optional) arguments as the triggering user.
2329+
Executes the given command with the provided (optional) arguments as the triggering user and returns the response.
23282330

2329-
This will not work for commands with paginated embed results, e.g. `warnings`.
2331+
This will not work for commands which have their response marked as a manual response, i.e. `wouldyourather` and `poll`.
23302332

23312333
#### getWarnings
23322334

0 commit comments

Comments
 (0)