Skip to content

Commit

Permalink
refactor: Separate links from messages with newline rather than space
Browse files Browse the repository at this point in the history
  • Loading branch information
marvin-roesch committed Oct 25, 2024
1 parent 7abc811 commit d10a292
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/atom.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func (plugin *AtomPlugin) Check(offset interface{}, context PluginContext) (inte

for _, entry := range sortedEntries {
if err = context.Discord.SendWithCustomAvatar(
fmt.Sprintf("%s %s", plugin.Message, entry.Link),
fmt.Sprintf("%s\n%s", plugin.Message, entry.Link),
plugin.Nickname,
plugin.AvatarURL,
nil,
Expand Down
2 changes: 1 addition & 1 deletion plugins/twitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func (plugin *TwitterPlugin) Check(offset interface{}, context PluginContext) (i
baseUrl = plugin.EmbedURL
}

text := fmt.Sprintf("%s %s/%s/status/%s", message, baseUrl, messageTweet.Username, messageTweet.ID)
text := fmt.Sprintf("%s\n%s/%s/status/%s", message, baseUrl, messageTweet.Username, messageTweet.ID)
if tweet.RetweetedStatus != nil {
text = fmt.Sprintf(
"%s (<%s/%s/status/%s>)",
Expand Down
2 changes: 1 addition & 1 deletion plugins/youtube.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func (plugin *YouTubePlugin) Check(offset interface{}, context PluginContext) (i
}

if err = context.Discord.Send(
fmt.Sprintf("%s %s", message, entry.Link),
fmt.Sprintf("%s\n%s", message, entry.Link),
"YouTube",
"youtube",
nil,
Expand Down

0 comments on commit d10a292

Please sign in to comment.