Skip to content

Commit

Permalink
fix(FAQ): newline support in answers
Browse files Browse the repository at this point in the history
  • Loading branch information
Kesuaheli committed Jan 5, 2025
1 parent 761c976 commit 21b31b3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/faq/faqBase.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"database/sql"
"errors"
"fmt"
"strings"
"time"

"github.com/bwmarrin/discordgo"
Expand Down Expand Up @@ -47,6 +48,7 @@ func (faq faqBase) getAllFAQs() (map[string]string, error) {
if err := row.Scan(&question, &answer); err != nil {
return lastFAQs[faq.Interaction.GuildID], fmt.Errorf("scanning row: %w", err)
}
answer = strings.ReplaceAll(answer, "\\\\", "\\")
lastFAQs[faq.Interaction.GuildID][question] = answer
}

Expand Down

0 comments on commit 21b31b3

Please sign in to comment.