Skip to content

About

discord bot built on an NLP that recognizes speech patterns of certain user and flags messages with similar patterns. Started as a joke between me and my friends, turned into a fun project.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Speech_Pattern_Bot

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.

Dependencies

pip install -r requirements.txt

  • pandas
  • joblib
  • scikit-learn
  • discord

Setup Steps

0. (Recommended) Setup Virtual Environment

MacOS/Linux:
python3 -m venv NAME
source NAME/bin/activate

Windows:
python3 -m venv env
.\env\Scripts\activate

1. Export chat(s)

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

2. Change all the placeholders

  • 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

4. Run bot.py


Screenshot 2024-08-09 at 11 49 37 PM

5. (Optional) Change threshold in Bot.py to change 'strictness' of bot

Usage

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.

Screenshot 2024-08-09 at 11 48 43 PM

You can use the application command /Accuracy to return the models accuracy to the channel where it is used.

Screenshot 2024-08-09 at 11 54 05 PM

Soon:

  • Automate the downloading all required data through 1 app command.
  • Command to turn bot 'on' and 'off'.
  • Command to change 'harshness' of bot.

About

discord bot built on an NLP that recognizes speech patterns of certain user and flags messages with similar patterns. Started as a joke between me and my friends, turned into a fun project.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages