From 271f628dbb5e49fc3036fcbe995ac9654dac15c8 Mon Sep 17 00:00:00 2001 From: unintended fraud Date: Wed, 12 Oct 2022 07:53:38 +0200 Subject: [PATCH] t --- commands/pinned.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/commands/pinned.go b/commands/pinned.go index 0e4bb5b..e7c1bc5 100644 --- a/commands/pinned.go +++ b/commands/pinned.go @@ -77,6 +77,10 @@ var Pinned tempest.Command = tempest.Command{ } } + if err := itx.Client.CrosspostMessage(channelData.MessageOfTheDay.Message.ChannelId, channelData.MessageOfTheDay.Message.Id); err != nil { + itx.SendLinearReply(err.Error(), true) + } + if err := itx.SendReply(tempest.ResponseData{ Content: formatMessageContent(channelData.MessageOfTheDay.Message), }, false); err != nil { @@ -91,8 +95,11 @@ func formatMessageContent(m tempest.Message) string { fmt.Sprintf("par **%s** le %s", m.Author.Username, m.Timestamp.Format("02/01/2006 15:04")), "-", m.Content, + m.Author.AvatarHash, } + + return strings.Join(lines, "\n") }