package api import ( "context" "github.com/TicketsBot/GoPanel/botcontext" "github.com/TicketsBot/GoPanel/utils" "github.com/gin-gonic/gin" ) func EmojisHandler(ctx *gin.Context) { guildId := ctx.Keys["guildid"].(uint64) botContext, err := botcontext.ContextForGuild(guildId) if err != nil { ctx.JSON(500, utils.ErrorJson(err)) return } // TODO: Use proper context emojis, err := botContext.GetGuildEmojis(context.Background(), guildId) if err != nil { ctx.JSON(500, utils.ErrorJson(err)) return } ctx.JSON(200, emojis) }