Skip to content

Commit

Permalink
fix: marshalling
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTipo01 committed Mar 16, 2022
1 parent 4dd3f15 commit e830854
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion markov.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func buildModel(guildID string) *gomarkov.Chain {

// saveModel updates the model on the database
func saveModel(guildID string) {
data, _ := json.Marshal(server[guildID].model)
data, _ := server[guildID].model.MarshalJSON()

_, err := db.Exec("UPDATE servers SET model=? WHERE id=?", data, guildID)

Expand Down

0 comments on commit e830854

Please sign in to comment.