mirror of
https://github.com/Luzifer/discord-community.git
synced 2024-11-08 15:10:02 +00:00
Fix: Allow locale time in templating
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
4f63bf2d19
commit
5c305cd887
1 changed files with 4 additions and 1 deletions
|
@ -212,8 +212,11 @@ func (m modStreamSchedule) assembleEmbed(data *twitchStreamSchedule) *discordgo.
|
|||
}
|
||||
|
||||
func (m modStreamSchedule) executeContentTemplate(data *twitchStreamSchedule) (string, error) {
|
||||
fns := sprig.FuncMap()
|
||||
fns["localeStrftime"] = localeStrftime
|
||||
|
||||
tpl, err := template.New("streamschedule").
|
||||
Funcs(sprig.FuncMap()).
|
||||
Funcs(fns).
|
||||
Parse(m.attrs.MustString("content", ptrStringEmpty))
|
||||
if err != nil {
|
||||
return "", errors.Wrap(err, "parsing template")
|
||||
|
|
Loading…
Reference in a new issue