|
|
@ -8,13 +8,6 @@ import (
|
|
|
|
|
|
|
|
|
|
|
|
const starEmoji = "⭐"
|
|
|
|
const starEmoji = "⭐"
|
|
|
|
|
|
|
|
|
|
|
|
func starboardAutoReact(s *discordgo.Session, m *discordgo.MessageCreate) {
|
|
|
|
|
|
|
|
err := s.MessageReactionAdd(m.ChannelID, m.ID, starEmoji)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
logError(s, "starboardAutoReact", m.ChannelID, m.ID, err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func listenToStarboardReact(s *discordgo.Session, m *discordgo.MessageReactionAdd) {
|
|
|
|
func listenToStarboardReact(s *discordgo.Session, m *discordgo.MessageReactionAdd) {
|
|
|
|
if m.Emoji.Name != starEmoji {
|
|
|
|
if m.Emoji.Name != starEmoji {
|
|
|
|
return
|
|
|
|
return
|
|
|
@ -52,6 +45,7 @@ func listenToStarboardReact(s *discordgo.Session, m *discordgo.MessageReactionAd
|
|
|
|
"645551408283648000",
|
|
|
|
"645551408283648000",
|
|
|
|
&discordgo.MessageEmbed{
|
|
|
|
&discordgo.MessageEmbed{
|
|
|
|
Title: "Starred Message",
|
|
|
|
Title: "Starred Message",
|
|
|
|
|
|
|
|
Description: msg.Content,
|
|
|
|
URL: "https://discordapp.com/channels/" + m.GuildID + "/" + m.ChannelID + "/" + m.MessageID,
|
|
|
|
URL: "https://discordapp.com/channels/" + m.GuildID + "/" + m.ChannelID + "/" + m.MessageID,
|
|
|
|
Color: color,
|
|
|
|
Color: color,
|
|
|
|
Timestamp: messageTimestamp.Format(time.RFC3339),
|
|
|
|
Timestamp: messageTimestamp.Format(time.RFC3339),
|
|
|
|