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
add first bits of jinja template support #50
Conversation
This PR is growing too fast. Initially I only wanted to add some jinja templates .. but now it became half a bot framework. ;-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks really nice, thank you :)
bot/task_handlers.py
Outdated
expiry_time = discord_timestamp(self.expiry_date, DiscordTimestampStyle.long_time) | ||
expiry_relatve = discord_timestamp(self.expiry_date, DiscordTimestampStyle.relative_time) | ||
return await self.bot.post_template( | ||
template_name, task=self.task, expiry_time=expiry_time, expiry_relatve=expiry_relatve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
;-) good catch, thx
[WIP]
Notes:
.pre-commit-config.yaml
toexclude: "build|stubs|^bot/templates/"
because chat message templates should not be reformatted and some should not have a newline before EOF.