Prompting System
The Light Services Manager bot features a powerful prompting system that allows you to create custom questionnaires for commissions, applications, and support tickets. This guide covers all aspects of the prompting system, including prompt types, configuration options, and conditional prompting.
Introduction to Prompts
Prompts are questions or interactive elements presented to users when they create a ticket. They are configured in the prompts.yml
file and can be customized for each ticket type. The bot supports several prompt types, each designed for different kinds of input.
Prompts are displayed sequentially to users, with each prompt appearing after the previous one has been answered. The responses are saved and can be used by managers and freelancers to understand the user's needs.
Prompt Configuration
Prompts are configured in the prompts.yml
file. The structure of this file is as follows:
commissions:
- type: "text"
label: "Project Description"
description: "Please describe your project in detail."
min: 50
max: 2000
# More commission prompts...
applications:
- type: "boolean"
label: "Previous Experience"
description: "Do you have previous experience in this field?"
# More application prompts...
support:
- type: "select menu"
label: "Support Category"
description: "Please select the category that best describes your issue."
selectMenuData:
placeholder: "Select a category"
minValuesSelected: 1
maxValuesSelected: 1
options:
- label: "Technical Issue"
description: "Problems with the bot or system"
- label: "Billing Question"
description: "Questions about payments or invoices"
# More support prompts...
Each prompt must have a type
and label
property. The description
property is optional but recommended to provide context to the user.
Prompt Types
The bot supports seven types of prompts, each serving a different purpose:
1. Service Select Menu (service select
)
Do not add this prompt type manually!
You SHOULD NOT add this prompt manually to your prompts.yml
file. It is automatically included by the bot in commission and application tickets and is non-removable. This section is only documented for the sake of completeness.
This is a special type of select menu that presents available services to the user. It's automatically added to all commission and application tickets and is a core, unremovable functionality of the bot.
Properties:
label
: The title of the prompt (required)description
: Additional information about the prompt (optional)selectMenuData
: Configuration for the select menu (required)placeholder
: Text shown when no option is selectedminValuesSelected
: Minimum number of options that can be selected (1-25)maxValuesSelected
: Maximum number of options that can be selected (1-25)
The options for this menu are automatically populated based on the services configured in your services.yml
file.
2. Select Menu (select menu
)
A customizable dropdown menu that allows users to select one or more options.
Properties:
label
: The title of the prompt (required)description
: Additional information about the prompt (optional)selectMenuData
: Configuration for the select menu (required)placeholder
: Text shown when no option is selectedminValuesSelected
: Minimum number of options that can be selected (1-25)maxValuesSelected
: Maximum number of options that can be selected (1-25)options
: An array of options to display (required)label
: Display text for the option (required)value
: Value to store when selected (optional, defaults to label)description
: Additional information about the option (optional)dropdownEmoji
: Emoji to display next to the option (optional)
Example:
- type: "select menu"
label: "Preferred Communication Method"
description: "How would you like us to contact you?"
selectMenuData:
placeholder: "Select an option"
minValuesSelected: 1
maxValuesSelected: 2
options:
- label: "Discord DM"
description: "Direct messages on Discord"
dropdownEmoji: "💬"
- label: "Email"
description: "Communication via email"
dropdownEmoji: "📧"
- label: "Phone"
description: "Phone calls or text messages"
dropdownEmoji: "📱"
3. Option Select (option
)
Displays a set of buttons for the user to choose from. This is useful for simple choice selections.
Properties:
label
: The title of the prompt (required)description
: Additional information about the prompt (optional)options
: An array of string options to display as buttons (required)
Example:
- type: "option"
label: "Project Timeframe"
description: "When do you need this project completed?"
options:
- "ASAP (1-2 days)"
- "This week (3-7 days)"
- "This month (8-30 days)"
- "No rush (30+ days)"
4. Text Input (text
)
Allows the user to enter free-form text, such as descriptions or specifications.
Properties:
label
: The title of the prompt (required)description
: Additional information about the prompt (optional)min
: Minimum number of characters required (optional, defaults to 0)max
: Maximum number of characters allowed (optional, defaults to 1000)
Example:
- type: "text"
label: "Project Description"
description: "Please describe your project in detail, including any specific requirements."
min: 50
max: 2000
5. Budget Input (budget
)
Specifically designed for budget questions, accepting either a number or "quote" as a response.
Properties:
label
: The title of the prompt (required)description
: Additional information about the prompt (optional)min
: Minimum budget amount (optional)max
: Maximum budget amount (optional)
Example:
- type: "budget"
label: "Project Budget"
description: "What is your budget for this project? Type a number or 'quote' if you'd like to receive quotes."
min: 10
max: 10000
6. Number Input (number
)
Accepts only numerical input from the user.
Properties:
label
: The title of the prompt (required)description
: Additional information about the prompt (optional)min
: Minimum value (optional)max
: Maximum value (optional)
Example:
- type: "number"
label: "Team Size"
description: "How many people will be using the product?"
min: 1
max: 1000
7. Boolean Choice (boolean
)
Presents the user with Yes/No buttons for simple binary choices.
Properties:
label
: The title of the prompt (required)description
: Additional information about the prompt (optional)yesLabel
: Custom label for the "Yes" button (optional)noLabel
: Custom label for the "No" button (optional)
Example:
- type: "boolean"
label: "Previous Experience"
description: "Have you worked with us before?"
yesLabel: "Yes, I have"
noLabel: "No, first time"
Conditional Prompts
Conditional prompts allow you to show or hide questions based on the answers to previous questions. This creates a dynamic questionnaire that adapts to the user's responses.
To make a prompt conditional, add a showIf
property that specifies:
- Which previous prompt's answer to check (
previousPromptLabel
) - What values should trigger this prompt to appear (
value
)
Properties:
showIf
: Object containing the condition (optional)previousPromptLabel
: The label of a previous prompt to checkvalue
: Array of possible values that will show this prompt
If the user's response to the specified previous prompt matches any of the values in the value
array, the conditional prompt will be shown. Otherwise, it will be skipped.
WARNING
The referenced previous prompt must come BEFORE the conditional prompt in the sequence. You cannot reference a prompt that appears later in the list.
Example:
- type: "select menu"
label: "What kind of support are you in need of?"
description: "Please select the type of support you need"
selectMenuData:
placeholder: "Select support type"
minValuesSelected: 1
maxValuesSelected: 1
options:
- label: "General question"
- label: "Product question"
- label: "Other"
- type: "select menu"
label: "Select the product"
description: "Which product are you having issues with?"
showIf:
previousPromptLabel: "What kind of support are you in need of?" # Matches the label of the previous prompt
value: ["Product question"] # Matches possible choice from one of the previous prompts
selectMenuData:
placeholder: "Select a product"
minValuesSelected: 1
maxValuesSelected: 1
options:
- label: "Light Services Manager"
- label: "Other product"
In this example, the "Select the product" prompt will only be shown if the user selects "Product question" in the previous question.
Advanced Configurations
Multi-Level Conditionals
You can create nested conditions by chaining conditional prompts:
- type: "select menu"
label: "Category"
selectMenuData:
# Options...
- type: "select menu"
label: "Subcategory"
showIf:
previousPromptLabel: "Category"
value: ["Design"]
selectMenuData:
# Options...
- type: "text"
label: "Design Requirements"
showIf:
previousPromptLabel: "Subcategory"
value: ["Logo Design", "UI/UX Design"]
# Additional properties...
Response Formatting
When responses are displayed in the ticket, they follow this format:
- Question: [Label of the prompt]
- Answer: [User's response]
For select menus with multiple selections, the responses are joined with commas.
Complete Example Configuration
Here's a comprehensive example of a prompts.yml
file with all prompt types and conditional logic:
commissions:
- type: "select menu"
label: "Project Type"
description: "What type of project are you looking to commission?"
selectMenuData:
placeholder: "Select a project type"
minValuesSelected: 1
maxValuesSelected: 1
options:
- label: "Website Development"
description: "Custom website or web application"
dropdownEmoji: "🌐"
- label: "Bot Development"
description: "Custom Discord bot or automation"
dropdownEmoji: "🤖"
- label: "Design Work"
description: "Logos, graphics, UI/UX design"
dropdownEmoji: "🎨"
- label: "Other"
description: "Something not listed here"
dropdownEmoji: "❓"
- type: "select menu"
label: "Website Type"
description: "What kind of website are you looking for?"
showIf:
previousPromptLabel: "Project Type"
value: ["Website Development"]
selectMenuData:
placeholder: "Select website type"
minValuesSelected: 1
maxValuesSelected: 1
options:
- label: "Static Website"
description: "Simple informational website"
- label: "E-commerce Store"
description: "Online store with payment processing"
- label: "Web Application"
description: "Interactive web-based software"
- type: "select menu"
label: "Bot Features"
description: "What features do you need in your bot?"
showIf:
previousPromptLabel: "Project Type"
value: ["Bot Development"]
selectMenuData:
placeholder: "Select desired features"
minValuesSelected: 1
maxValuesSelected: 5
options:
- label: "Moderation"
description: "User management and moderation features"
- label: "Economy"
description: "Virtual currency and economy systems"
- label: "Music"
description: "Audio streaming capabilities"
- label: "Custom Commands"
description: "User-defined command functionality"
- label: "Games"
description: "Interactive games within Discord"
- type: "option"
label: "Design Type"
description: "What type of design do you need?"
showIf:
previousPromptLabel: "Project Type"
value: ["Design Work"]
options:
- "Logo Design"
- "Brand Identity"
- "UI/UX Design"
- "Social Media Graphics"
- "Other Graphics"
- type: "text"
label: "Project Description"
description: "Please describe your project in detail. Include any specific requirements or preferences."
min: 50
max: 2000
- type: "budget"
label: "Budget"
description: "What is your budget for this project? Type a number or 'quote' if you'd like to receive quotes."
min: 10
- type: "number"
label: "Timeline (Days)"
description: "How many days do you expect the project to take?"
min: 1
max: 365
- type: "boolean"
label: "Previous Experience"
description: "Have you worked with freelancers before?"
yesLabel: "Yes, I have"
noLabel: "No, first time"
applications:
- type: "text"
label: "Introduction"
description: "Please introduce yourself and tell us about your background."
min: 100
max: 2000
- type: "text"
label: "Portfolio"
description: "Please provide links to your portfolio, GitHub, or previous work examples."
min: 10
max: 1000
- type: "select menu"
label: "Experience Level"
description: "How would you describe your experience level?"
selectMenuData:
placeholder: "Select your experience level"
minValuesSelected: 1
maxValuesSelected: 1
options:
- label: "Beginner (0-1 years)"
description: "Just starting out"
- label: "Intermediate (1-3 years)"
description: "Some professional experience"
- label: "Advanced (3-5 years)"
description: "Significant professional experience"
- label: "Expert (5+ years)"
description: "Extensive professional experience"
- type: "option"
label: "Availability"
description: "How many hours per week can you dedicate to freelance work?"
options:
- "Less than 10 hours"
- "10-20 hours"
- "20-30 hours"
- "30-40 hours"
- "40+ hours"
- type: "boolean"
label: "Team Projects"
description: "Are you willing to work on team projects?"
support:
- type: "select menu"
label: "Support Category"
description: "What type of support do you need?"
selectMenuData:
placeholder: "Select a category"
minValuesSelected: 1
maxValuesSelected: 1
options:
- label: "Technical Issue"
description: "Problems with functionality"
dropdownEmoji: "🔧"
- label: "Billing Question"
description: "Questions about payments or invoices"
dropdownEmoji: "💰"
- label: "Feature Request"
description: "Suggestions for new features"
dropdownEmoji: "💡"
- label: "Other"
description: "Something else"
dropdownEmoji: "❓"
- type: "text"
label: "Technical Details"
description: "Please provide details about the technical issue you're experiencing."
showIf:
previousPromptLabel: "Support Category"
value: ["Technical Issue"]
min: 50
max: 1000
- type: "text"
label: "Invoice ID"
description: "Please provide the ID of the invoice you have questions about."
showIf:
previousPromptLabel: "Support Category"
value: ["Billing Question"]
min: 5
max: 50
- type: "text"
label: "Feature Description"
description: "Please describe the feature you'd like to see implemented."
showIf:
previousPromptLabel: "Support Category"
value: ["Feature Request"]
min: 50
max: 1000
- type: "text"
label: "Support Request"
description: "Please describe what you need help with."
showIf:
previousPromptLabel: "Support Category"
value: ["Other"]
min: 50
max: 1000
Conclusion
The prompting system is a powerful tool for gathering information from users. By leveraging different prompt types and conditional logic, you can create a seamless and efficient questionnaire that collects exactly the information you need for each ticket type.
Experiment with different configurations to find what works best for your community's needs. Remember that well-designed prompts lead to better communication and more successful projects.