|
|
@ -1,8 +1,6 @@
|
|
|
|
package db
|
|
|
|
package db
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/jinzhu/gorm"
|
|
|
|
"github.com/jinzhu/gorm"
|
|
|
|
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
|
|
|
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -29,7 +27,6 @@ func Close() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func CreateReactRole(messageID, emojiID, roleID string) {
|
|
|
|
func CreateReactRole(messageID, emojiID, roleID string) {
|
|
|
|
fmt.Println("CreateReactRole", messageID, emojiID, roleID)
|
|
|
|
|
|
|
|
db.Create(&ReactRole{
|
|
|
|
db.Create(&ReactRole{
|
|
|
|
MessageID: messageID,
|
|
|
|
MessageID: messageID,
|
|
|
|
EmojiID: emojiID,
|
|
|
|
EmojiID: emojiID,
|
|
|
@ -38,7 +35,6 @@ func CreateReactRole(messageID, emojiID, roleID string) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func GetReactRole(messageID, emojiID string) string {
|
|
|
|
func GetReactRole(messageID, emojiID string) string {
|
|
|
|
fmt.Println("GetReactRole", messageID, emojiID)
|
|
|
|
|
|
|
|
result := ReactRole{
|
|
|
|
result := ReactRole{
|
|
|
|
MessageID: messageID,
|
|
|
|
MessageID: messageID,
|
|
|
|
EmojiID: emojiID,
|
|
|
|
EmojiID: emojiID,
|
|
|
|