File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,12 @@ func (v *Forumer) update() {
166166 Value : string (new_post .LastUpdated ),
167167 Inline : true ,
168168 })
169- content .WriteString (fmt .Sprintf ("```%s```\n " , new_post .PostContent [:600 ]))
169+
170+ var post_content string = string (new_post .PostContent )
171+ if len (post_content ) >= 600 {
172+ post_content = post_content [:600 ]
173+ }
174+ content .WriteString (fmt .Sprintf ("```%s```\n " , post_content ))
170175 embed .Description = content .String ()
171176
172177 embed .Thumbnail = & discordgo.MessageEmbedThumbnail {URL : string (new_post .PostAuthorAvatarLink )}
Original file line number Diff line number Diff line change @@ -86,6 +86,11 @@ func (v ChannelView) DeleteOld() {
8686 continue
8787 }
8888
89+ // embeding msgs contain forumer emails
90+ if len (msg .Embeds ) > 0 {
91+ continue
92+ }
93+
8994 if deleteLimit <= 0 {
9095 break
9196 }
You can’t perform that action at this time.
0 commit comments