Made paths no longer required
This commit is contained in:
parent
d4be9cb849
commit
47ff409902
3 changed files with 10 additions and 9 deletions
|
@ -36,7 +36,7 @@ public enum ButtonType
|
||||||
// A tree of questions representing an interview.
|
// A tree of questions representing an interview.
|
||||||
// The tree is generated by the config file when a new ticket is opened or the restart interview command is used.
|
// The tree is generated by the config file when a new ticket is opened or the restart interview command is used.
|
||||||
// Additional components not specified in the config file are populated as the interview progresses.
|
// Additional components not specified in the config file are populated as the interview progresses.
|
||||||
// The entire interview tree is serialized and stored in the database in order to record responses as they are made.
|
// The entire interview tree is serialized and stored in the database to record responses as they are made.
|
||||||
public class InterviewQuestion
|
public class InterviewQuestion
|
||||||
{
|
{
|
||||||
// Title of the message embed.
|
// Title of the message embed.
|
||||||
|
@ -83,7 +83,7 @@ public class InterviewQuestion
|
||||||
|
|
||||||
// Possible questions to ask next, an error message, or the end of the interview.
|
// Possible questions to ask next, an error message, or the end of the interview.
|
||||||
[JsonProperty("paths")]
|
[JsonProperty("paths")]
|
||||||
public Dictionary<string, InterviewQuestion> paths;
|
public Dictionary<string, InterviewQuestion> paths = new();
|
||||||
|
|
||||||
// ////////////////////////////////////////////////////////////////////////////
|
// ////////////////////////////////////////////////////////////////////////////
|
||||||
// The following parameters are populated by the bot, not the json template. //
|
// The following parameters are populated by the bot, not the json template. //
|
||||||
|
|
|
@ -134,7 +134,7 @@
|
||||||
"minimum": 0
|
"minimum": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [ "message", "message-type", "color", "paths" ],
|
"required": [ "message", "message-type", "color" ],
|
||||||
"unevaluatedProperties": false
|
"unevaluatedProperties": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -77,6 +77,7 @@ It is highly recommended to use the interview template JSON schema to get live v
|
||||||
This section lists all the properties that can be used in an interview template.
|
This section lists all the properties that can be used in an interview template.
|
||||||
If you have set up your editor as suggested above it will handle a lot of this for you automatically.
|
If you have set up your editor as suggested above it will handle a lot of this for you automatically.
|
||||||
|
|
||||||
|
Here is a simple example of an interview asking a user for their favourite colour out of the different button colours:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"category-id": "1006863882301755503",
|
"category-id": "1006863882301755503",
|
||||||
|
@ -88,7 +89,7 @@ If you have set up your editor as suggested above it will handle a lot of this f
|
||||||
"summary-field": "Favourite colour",
|
"summary-field": "Favourite colour",
|
||||||
"paths":
|
"paths":
|
||||||
{
|
{
|
||||||
"PRIMARY":
|
"Blue":
|
||||||
{
|
{
|
||||||
"message": "Summary",
|
"message": "Summary",
|
||||||
"message-type": "END_WITH_SUMMARY",
|
"message-type": "END_WITH_SUMMARY",
|
||||||
|
@ -96,7 +97,7 @@ If you have set up your editor as suggested above it will handle a lot of this f
|
||||||
"button-style": "PRIMARY",
|
"button-style": "PRIMARY",
|
||||||
"paths": {}
|
"paths": {}
|
||||||
},
|
},
|
||||||
"SECONDARY":
|
"Gray":
|
||||||
{
|
{
|
||||||
"message": "Summary",
|
"message": "Summary",
|
||||||
"message-type": "END_WITH_SUMMARY",
|
"message-type": "END_WITH_SUMMARY",
|
||||||
|
@ -104,7 +105,7 @@ If you have set up your editor as suggested above it will handle a lot of this f
|
||||||
"button-style": "SECONDARY",
|
"button-style": "SECONDARY",
|
||||||
"paths": {}
|
"paths": {}
|
||||||
},
|
},
|
||||||
"SUCCESS":
|
"Green":
|
||||||
{
|
{
|
||||||
"message": "Summary",
|
"message": "Summary",
|
||||||
"message-type": "END_WITH_SUMMARY",
|
"message-type": "END_WITH_SUMMARY",
|
||||||
|
@ -112,7 +113,7 @@ If you have set up your editor as suggested above it will handle a lot of this f
|
||||||
"button-style": "SUCCESS",
|
"button-style": "SUCCESS",
|
||||||
"paths": {}
|
"paths": {}
|
||||||
},
|
},
|
||||||
"DANGER":
|
"Red":
|
||||||
{
|
{
|
||||||
"message": "Summary",
|
"message": "Summary",
|
||||||
"message-type": "END_WITH_SUMMARY",
|
"message-type": "END_WITH_SUMMARY",
|
||||||
|
@ -162,7 +163,7 @@ The text in the embed message that will be sent to the user when they reach this
|
||||||
<td>Yes</td>
|
<td>Yes</td>
|
||||||
<td>String</td>
|
<td>String</td>
|
||||||
<td>
|
<td>
|
||||||
The type of message, decides what the bot will do when the user gets to this step.
|
The type of message, decides what the bot will do when the user gets to this step. See the list of message types below for more info.
|
||||||
|
|
||||||
<!-- For whatever reason this tag cannot be indented -->
|
<!-- For whatever reason this tag cannot be indented -->
|
||||||
</td>
|
</td>
|
||||||
|
@ -184,7 +185,7 @@ Colour of the message embed. You can either enter a colour name or a hexadecimal
|
||||||
<td>
|
<td>
|
||||||
`paths`
|
`paths`
|
||||||
</td>
|
</td>
|
||||||
<td>Yes</td>
|
<td>No</td>
|
||||||
<td>Steps</td>
|
<td>Steps</td>
|
||||||
<td>
|
<td>
|
||||||
One or more interview steps. The name of the step is used as a regex match against the user's answer,
|
One or more interview steps. The name of the step is used as a regex match against the user's answer,
|
||||||
|
|
Loading…
Reference in a new issue