Klasse DMListener

java.lang.Object
eu.hobbydev.bracheus.listeners.DMListener
Alle implementierten Schnittstellen:
Listener, HumanizerTools

public class DMListener extends Object implements Listener, HumanizerTools
The `DMListener` class is responsible for listening to and interacting with direct messages (DMs) on Instagram. It continuously checks for new messages and responds automatically using the OpenAI-powered response generation. This class is designed to work with Selenium to automate the process of opening chats, reading unread messages, and sending replies. It also supports a blacklist mechanism to ensure that repeated or spammy messages are avoided. The `DMListener` implements the `Listener` interface to run checks and the `HumanizerTools` interface for handling human-like message behaviors. It uses Selenium to interact with the Instagram Direct Message interface to fetch unread messages, process them, and send automated responses based on the content of the conversation. This class is also responsible for managing interactions with the blacklist, ensuring that certain users' messages are not answered if previously handled.
  • Konstruktordetails

    • DMListener

      public DMListener()
  • Methodendetails

    • runCheckup

      public void runCheckup()
      Runs the periodic checkup to verify new messages and respond accordingly. This method performs checks for unread messages and, if any are found, triggers the `answerMessages()` method.
      Angegeben von:
      runCheckup in Schnittstelle Listener
    • getName

      public String getName()
      Returns the name of the listener, which is used for logging and identification purposes.
      Angegeben von:
      getName in Schnittstelle Listener
      Gibt zurück:
      the name of the listener, "DMListener".