mirror of
https://github.com/Fluffy-Bean/Lynxie.git
synced 2025-05-23 20:04:58 +00:00
Handle errors
This commit is contained in:
parent
3fafa834ed
commit
98dd655ddd
5 changed files with 58 additions and 16 deletions
|
@ -125,7 +125,7 @@ func registerAnimal(a *app.App) app.Callback {
|
|||
}
|
||||
defer res.Body.Close()
|
||||
|
||||
h.Session.ChannelMessageSendComplex(h.Message.ChannelID, &discordgo.MessageSend{
|
||||
_, err = h.Session.ChannelMessageSendComplex(h.Message.ChannelID, &discordgo.MessageSend{
|
||||
Embed: &discordgo.MessageEmbed{
|
||||
Title: "Animal",
|
||||
Image: &discordgo.MessageEmbedImage{
|
||||
|
@ -142,6 +142,12 @@ func registerAnimal(a *app.App) app.Callback {
|
|||
},
|
||||
Reference: h.Reference,
|
||||
})
|
||||
if err != nil {
|
||||
return app.Error{
|
||||
Msg: "failed to send tinyfox message",
|
||||
Err: err,
|
||||
}
|
||||
}
|
||||
|
||||
return app.Error{}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue