automatically remove colons for reactions

This commit is contained in:
Dot-Rar 2020-04-29 19:10:52 +01:00
parent 749f0ed798
commit 99b5b3f234

View File

@ -7,6 +7,7 @@ import (
"github.com/TicketsBot/GoPanel/utils" "github.com/TicketsBot/GoPanel/utils"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rxdn/gdl/objects/channel" "github.com/rxdn/gdl/objects/channel"
"strings"
) )
func CreatePanel(ctx *gin.Context) { func CreatePanel(ctx *gin.Context) {
@ -106,6 +107,8 @@ func (p *panel) verifyContent() bool {
} }
func (p *panel) getEmoji() (string, bool) { func (p *panel) getEmoji() (string, bool) {
p.Emote = strings.Replace(p.Emote, ":", "", -1)
emoji := utils.GetEmojiByName(p.Emote) emoji := utils.GetEmojiByName(p.Emote)
return emoji, emoji != "" return emoji, emoji != ""
} }