From ea6f29e75e275d51118864e2c0b5fe79e6d49359 Mon Sep 17 00:00:00 2001 From: dd84ai Date: Tue, 21 Nov 2023 23:29:18 +0100 Subject: [PATCH] fix: lack of ping in forumer --- app/forumer/run.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/forumer/run.go b/app/forumer/run.go index 9e8d3ac6..520bca00 100644 --- a/app/forumer/run.go +++ b/app/forumer/run.go @@ -170,8 +170,7 @@ func (v *Forumer) TrySendMsg(channel types.DiscordChannelID, new_post *forum_typ // embed.Timestamp = string() var content strings.Builder content.WriteString( - fmt.Sprintf("%s, received email from %s\n", - pingMessage, + fmt.Sprintf("received email from %s\n", fmt.Sprintf("[%s](<%s>)", new_post.PostAuthorName, new_post.PostAuthorLink))) embed.Fields = append(embed.Fields, &discordgo.MessageEmbedField{ Name: "Matched tags", @@ -195,7 +194,7 @@ func (v *Forumer) TrySendMsg(channel types.DiscordChannelID, new_post *forum_typ purple_color := 10181046 embed.Color = purple_color - _, err := dg.ChannelMessageSendEmbed(string(channel), embed) + _, err := dg.ChannelMessageSendComplex(string(channel), &discordgo.MessageSend{Embeds: []*discordgo.MessageEmbed{embed}, Content: string(pingMessage)}) logus.CheckError(err, "failed sending msg") return nil })