sticky messages now work without a modal and also with a context menu
This commit is contained in:
@@ -131,20 +131,12 @@ func getTagContent(guildID string, tagID string) string {
|
||||
return tagContent
|
||||
}
|
||||
|
||||
func addSticky(guildID string, channelID string, messageContent string, messageID string) bool {
|
||||
exists := hasSticky(guildID, channelID)
|
||||
if exists {
|
||||
_, err := db.Exec("UPDATE sticky SET message_content = $1 WHERE guild_id = $2 AND channel_id = $3", messageContent, guildID, channelID)
|
||||
if err != nil {
|
||||
logrus.Error(err)
|
||||
}
|
||||
} else {
|
||||
_, err := db.Exec("INSERT INTO sticky (guild_id, channel_id, message_id, message_content) VALUES ($1, $2, $3, $4)", guildID, channelID, messageID, messageContent)
|
||||
if err != nil {
|
||||
logrus.Error(err)
|
||||
}
|
||||
func addSticky(guildID string, channelID string, messageContent string, messageID string) {
|
||||
_, err := db.Exec("INSERT INTO sticky (guild_id, channel_id, message_id, message_content) VALUES ($1, $2, $3, $4)", guildID, channelID, messageID, messageContent)
|
||||
if err != nil {
|
||||
logrus.Error(err)
|
||||
}
|
||||
return exists
|
||||
|
||||
}
|
||||
|
||||
func hasSticky(guildID string, channelID string) bool {
|
||||
|
Reference in New Issue
Block a user