fix: add persona field username
This commit is contained in:
parent
26f5997687
commit
ba3f5ae0b2
1 changed files with 6 additions and 3 deletions
|
@ -45,9 +45,12 @@ export default class ChatBot {
|
||||||
} else {
|
} else {
|
||||||
if (this.trainType !== 'All') return
|
if (this.trainType !== 'All') return
|
||||||
if (!msg.content.startsWith('머핀아 ')) return
|
if (!msg.content.startsWith('머핀아 ')) return
|
||||||
const sql = `INSERT INTO statement(text, persona) VALUES('${msg.content
|
const user = `user:${msg.author.username
|
||||||
.replace('머핀아 ', '')
|
.replaceAll("'", '')
|
||||||
.replaceAll("'", '')}', 'user');`
|
.slice(0, 50)
|
||||||
|
.toLowerCase()}`
|
||||||
|
const text = msg.content.replace('머핀아 ', '').replaceAll("'", '')
|
||||||
|
const sql = `INSERT INTO statement(text, persona) VALUES('${text}', '${user}');`
|
||||||
this.db.run(sql, err => {
|
this.db.run(sql, err => {
|
||||||
if (err) throw err
|
if (err) throw err
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue