3
votes

Alright so here's the thing. I've been wanting to give my discord bot a bit of a personality for a while and wanted to know whether there are node.js libraries that will allow this to happen.

What I want is my bot to log a specific chat in a server, or perhaps maybe even grab a simple .txt file and analyze it, learn from it in which it will then generate its own messages and responses.

For example, let's say I make the bot read the messages that happen in general chat, the conversations between people and what their responses are, then analyze those conversations in order to create its own responses.

Something along the lines of that. Any tips?

1
So machine learning? I wouldn't know any thing too deep personally but brain.js is prob the most common library I hear when taking about machine learning in js github.com/BrainJS/brain.jsuser13429955

1 Answers

1
votes

As far as I know, the first thing you would need is to get training data. You could try and capture every single message that happens in the chat and then save it in a file. The problem is - you don't know what's a question and what's a response to that question. After somehow converting the list of messages into a list of questions and answers, you would need to make a machine learning program. And here I recommend:

tensorflow.org/js

brain.js.org

After making the program and successfully training it, you would need to actually implement it. For example, the bot could track messages and every n'th message, that it thinks is a question, it would respond with a learned response. Seems like a hard quest, however it is doable. Good luck!