Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement NestBot block message template system #342

Open
arkid15r opened this issue Jan 5, 2025 · 2 comments
Open

Implement NestBot block message template system #342

arkid15r opened this issue Jan 5, 2025 · 2 comments
Assignees
Labels
Milestone

Comments

@arkid15r
Copy link
Collaborator

arkid15r commented Jan 5, 2025

Is your feature request related to a problem? Please describe.
Currently NestBot commands and event handlers use markdown method for rendering user facing content. The formatting process is time consuming and somewhat cumbersome.

Describe the solution you'd like
The idea is to implement a some sort of template system that would allow writing the content in text files and convert it into properly formatted markdown before sending to a user.
It should recognize formatting for \n, <@user_id>, <#{OWASP_GSOC_CHANNEL_ID}> and similar values.

@bhagyashree980
Copy link
Collaborator

bhagyashree980 commented Jan 5, 2025

Hii @arkid15r ,please this issue assign to me.

@yashpandey06
Copy link
Collaborator

yashpandey06 commented Jan 5, 2025

My Approach:

  1. Template Directory Setup:

Create a templates/ directory containing template files with pre-written message content, including dynamic placeholders (e.g., {{ user_id }}, {{ channel_id }}).

  1. Template Engine:

Use a template engine like Jinja2 to render dynamic content. (Alternative engines like Mako can be considered also, but Jinja2 is widely used and well-supported.)

  1. Rendering Process:

The template engine will process the templates, replacing placeholders with dynamic data, and output properly formatted content ready to be sent to Slack.

@arkid15r arkid15r moved this from Backlog to Todo in Project Nest Jan 7, 2025
@arkid15r arkid15r moved this from Todo to In progress in Project Nest Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In progress
Development

No branches or pull requests

3 participants