Discord bot built on an NLP that recognizes speech patterns of a certain user and flags messages with similar patterns. Started as a joke between me and my friends, turned into a fun project.
Note
The accuracy on this model may vary on the size of training data, relative size of datasets, quality of data and other factors.
pip install -r requirements.txt
- pandas
- joblib
- scikit-learn
- discord
MacOS/Linux:
python3 -m venv NAME
source NAME/bin/activate
Windows:
python3 -m venv env
.\env\Scripts\activate
Prefferably with that has a large amount of messages from the user you want to pick up the speech patterns of.
Use: https://github.com/Tyrrrz/DiscordChatExporter
if you want the formatting python file under /data to work
- File directories under csvCreation.py
- File directories under NLP.py
- Message to respond with (line 62 Bot.py)
- Bot Token in Bot.py (line 129)
3. Configure Bot under Discord Developer Portal
When running, the bot will automatically send a message with whatever you set it to, in the case of my friend who speaks very 'methodologically' it will reply with 'Methodicall'. The bot will then give you the option to reply with a check () or a cross () upon which it will expand the data set and the new accuracy data will output to the console.
You can use the application command /Accuracy to return the models accuracy to the channel where it is used.
Soon:
- Automate the downloading all required data through 1 app command.
- Command to turn bot 'on' and 'off'.
- Command to change 'harshness' of bot.