mirror of https://github.com/velour/catbase.git
meme: maybe fix discord maybe not
This commit is contained in:
parent
91ac29d085
commit
defeb9b3b1
|
@ -170,6 +170,7 @@ func (d *Discord) convertUser(u *discordgo.User) *user.User {
|
||||||
ID: u.ID,
|
ID: u.ID,
|
||||||
Name: u.Username,
|
Name: u.Username,
|
||||||
Admin: false,
|
Admin: false,
|
||||||
|
Icon: d.client.State.User.AvatarURL("64"),
|
||||||
IconImg: img,
|
IconImg: img,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -207,8 +207,7 @@ func (p *MemePlugin) sendMeme(c bot.Connector, channel, channelName, msgID strin
|
||||||
encodedSpec, _ := json.Marshal(spec)
|
encodedSpec, _ := json.Marshal(spec)
|
||||||
|
|
||||||
w, h, err := p.checkMeme(imgURL)
|
w, h, err := p.checkMeme(imgURL)
|
||||||
_, _, err2 := p.checkMeme(stampURL)
|
if err != nil {
|
||||||
if err != nil || err2 != nil {
|
|
||||||
msg := fmt.Sprintf("Hey %v, I couldn't download that image you asked for.", from.Name)
|
msg := fmt.Sprintf("Hey %v, I couldn't download that image you asked for.", from.Name)
|
||||||
p.bot.Send(c, bot.Ephemeral, channel, from.ID, msg)
|
p.bot.Send(c, bot.Ephemeral, channel, from.ID, msg)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue