bot/legacy/UserTrain.md
2023-02-01 14:43:14 +09:00

369 B

User train

  • file: src/modules/ChatBot.ts
  • original code
if (this.trainType !== 'All') return
if (!msg.content.startsWith('머핀아 ')) return
const user = `user:${msg.author.username
 .replaceAll("'", '')
 .slice(0, 50)
  .toLowerCase()}`
const text = msg.content.replace('머핀아 ', '')
this.db.run(sql, [text, user], err => {
  if (err) throw err
})