|
|
|
@ -7,8 +7,12 @@ import (
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const starEmoji = "⭐"
|
|
|
|
|
const starChannel = "645551408283648000"
|
|
|
|
|
|
|
|
|
|
func listenToStarboardReact(s *discordgo.Session, m *discordgo.MessageReactionAdd) {
|
|
|
|
|
if m.ChannelID == starChannel {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if m.Emoji.Name != starEmoji {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
@ -41,8 +45,8 @@ func listenToStarboardReact(s *discordgo.Session, m *discordgo.MessageReactionAd
|
|
|
|
|
//White as fallback
|
|
|
|
|
color = 0xFFFFFF
|
|
|
|
|
}
|
|
|
|
|
_, err = s.ChannelMessageSendEmbed(
|
|
|
|
|
"645551408283648000",
|
|
|
|
|
msg, err = s.ChannelMessageSendEmbed(
|
|
|
|
|
starChannel,
|
|
|
|
|
&discordgo.MessageEmbed{
|
|
|
|
|
Title: "Starred Message",
|
|
|
|
|
Description: msg.Content,
|
|
|
|
@ -57,5 +61,10 @@ func listenToStarboardReact(s *discordgo.Session, m *discordgo.MessageReactionAd
|
|
|
|
|
)
|
|
|
|
|
if err != nil {
|
|
|
|
|
logError(s, "listenToStarboardReact", "channelMessageSendEmbed", err)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
err = s.MessageReactionAdd(msg.ChannelID, msg.ID, starEmoji)
|
|
|
|
|
if err != nil {
|
|
|
|
|
logError(s, "listenToStarboardReact", "messageReactionAdd", err)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|