From 99b5b3f2348ba6ce7ccf01eb6ba708b5db754678 Mon Sep 17 00:00:00 2001 From: Dot-Rar Date: Wed, 29 Apr 2020 19:10:52 +0100 Subject: [PATCH] automatically remove colons for reactions --- app/http/endpoints/api/panelcreate.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/http/endpoints/api/panelcreate.go b/app/http/endpoints/api/panelcreate.go index fa60686..08e8c31 100644 --- a/app/http/endpoints/api/panelcreate.go +++ b/app/http/endpoints/api/panelcreate.go @@ -7,6 +7,7 @@ import ( "github.com/TicketsBot/GoPanel/utils" "github.com/gin-gonic/gin" "github.com/rxdn/gdl/objects/channel" + "strings" ) func CreatePanel(ctx *gin.Context) { @@ -106,6 +107,8 @@ func (p *panel) verifyContent() bool { } func (p *panel) getEmoji() (string, bool) { + p.Emote = strings.Replace(p.Emote, ":", "", -1) + emoji := utils.GetEmojiByName(p.Emote) return emoji, emoji != "" }