Veetaha / snowpity

Apache License 2.0
6 stars 1 forks source link

Allow customizations of the template of sending media #42

Open Veetaha opened 1 year ago

Veetaha commented 1 year ago

The users should be able to define their own message templates that override the default formatting of the message sent by the bot.

For example, they could use some templating language (the standard templating language is needed in #41 as well, so if that issue is closed, we know what language to use). With this language, they could define the format of the message they would like to send when sharing media via our bot.

For example a template like this:

{{ source }} by {{ authors }}

{{ tweet.text }}

This way users may explicitly choose to embed the text of the tweet into their shared tweets.

When users write a query to the bot they may add the template name to use when sending the message. It's not clear what syntax would work the best here. This should be researched. Naively, the simplest syntax like putting the name of the template after the media link may suffice:

@{BotName} {media_url} {template_name}
{additional_text}

The additional_text should also be a context variable for the templates.