diff --git a/plugins/meme/meme.go b/plugins/meme/meme.go index 1daf49d..3648aa3 100644 --- a/plugins/meme/meme.go +++ b/plugins/meme/meme.go @@ -123,10 +123,13 @@ func (p *MemePlugin) genMeme(meme, text string) string { } u, err := url.Parse(imgName) - if err != nil { + if err != nil || u.Scheme == "" { + log.Debug().Err(err).Str("imgName", imgName).Msgf("url not detected") u, _ = url.Parse("https://imgflip.com/s/meme/" + imgName) } + log.Debug().Msgf("Attempting to download url: %s", u.String()) + img := DownloadTemplate(u) r := img.Bounds() w := r.Dx()