|
|
@ -80,9 +80,7 @@ func ReactListener(s *discordgo.Session, m *discordgo.MessageReactionAdd) {
|
|
|
|
m.GuildID, m.ChannelID, m.MessageID,
|
|
|
|
m.GuildID, m.ChannelID, m.MessageID,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
msg, err = s.ChannelMessageSendEmbed(
|
|
|
|
embed := discordgo.MessageEmbed{
|
|
|
|
config.StarChannel,
|
|
|
|
|
|
|
|
&discordgo.MessageEmbed{
|
|
|
|
|
|
|
|
Title: "Starred Message",
|
|
|
|
Title: "Starred Message",
|
|
|
|
Description: content,
|
|
|
|
Description: content,
|
|
|
|
Color: color,
|
|
|
|
Color: color,
|
|
|
@ -91,8 +89,17 @@ func ReactListener(s *discordgo.Session, m *discordgo.MessageReactionAdd) {
|
|
|
|
Name: msg.Author.Username + "#" + msg.Author.Discriminator,
|
|
|
|
Name: msg.Author.Username + "#" + msg.Author.Discriminator,
|
|
|
|
IconURL: "https://cdn.discordapp.com/avatars/" + msg.Author.ID + "/" + msg.Author.Avatar + ".png",
|
|
|
|
IconURL: "https://cdn.discordapp.com/avatars/" + msg.Author.ID + "/" + msg.Author.Avatar + ".png",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
)
|
|
|
|
if len(msg.Embeds) > 0 && msg.Embeds[0].Image != nil {
|
|
|
|
|
|
|
|
img := msg.Embeds[0].Image
|
|
|
|
|
|
|
|
embed.Thumbnail = &discordgo.MessageEmbedThumbnail{
|
|
|
|
|
|
|
|
URL: img.URL,
|
|
|
|
|
|
|
|
ProxyURL: img.ProxyURL,
|
|
|
|
|
|
|
|
Width: img.Width,
|
|
|
|
|
|
|
|
Height: img.Height,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
msg, err = s.ChannelMessageSendEmbed(config.StarChannel, &embed)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
log.Error(s, "listenToStarboardReact", "channelMessageSendEmbed", err)
|
|
|
|
log.Error(s, "listenToStarboardReact", "channelMessageSendEmbed", err)
|
|
|
|
return
|
|
|
|
return
|
|
|
|