package main import ( "github.com/flosch/pongo2" "github.com/gofiber/fiber/v2" ) func PricingTableHandler(c *fiber.Ctx) error { return c.SendString(generatePricingTableChatHTML()) } func generatePricingTableChatHTML() string { stripeTable := ` ` closeBtn := `
` htmlString := "
" NextMessages := []TemplateMessage{} nextMsg := TemplateMessage{ Icon: "icons/bouvai2.png", // Assuming Icon is a field you want to include from Message Content: "
" + stripeTable + closeBtn, Hidden: false, // Assuming Hidden is a field you want to include from Message Id: "0", Name: "JADE", } NextMessages = append(NextMessages, nextMsg) botOut, err := botTmpl.Execute(pongo2.Context{"Messages": NextMessages, "ConversationAreaId": 0, "NotClickable": true, "notFlex": true}) if err != nil { panic(err) } htmlString += botOut htmlString += "
" htmlString += "
" // Render the HTML template with the messages return htmlString } func IsCurrentUserSubscribed() bool { // TODO Ask Stripe if user is subscribed return true } func IsCurrentUserLimiteReached() bool { // TODO Ask Stripe if user is subscribed return true }