samuelsogbesan / leetbot

LeetCode Question Bot for Discord.
Apache License 2.0
1 stars 0 forks source link

Prompt Factory 🏭 #32

Open samuelsogbesan opened 3 years ago

samuelsogbesan commented 3 years ago

We need a component for generating prompts. A prompt is a templates for a notification.

PromptFactory will contain methods for generating these prompts.

Example

PromptFactory.createWelcomeGreeting({ values }) may return the string 'Hello _NAME', where '_NAME' will be replaced by the value '_NAME' value in the values object.

This component is useful because it separates the text generation process from the notifier.

Put this component in bot/components/promptFactory.