fac30sb / discord-chatbot-emma-egbie

0 stars 0 forks source link

Fixed a couple of issues regarding refactoring and new feature added #28

Closed blackNoir2 closed 7 months ago

blackNoir2 commented 7 months ago

Fixed two issues: Fixed two issues:

  1. The first issue was caused by the last refactoring, which broke the ability to send direct messages to users.

  2. The second issue arose after fixing the first issue and adding functionality for the bot to monitor all typed content and take appropriate actions in real time:

    • If the language violates the OpenAI module, a warning message is sent. If not, the content is sent directly to OpenAI for processing and returns an answer.

    The problem lies in the latter part, where OpenAI processes direct messages sent between users. For example, "@SomeUsername hello, how are you today?" – The message is sent to the user, but OpenAI also processes the direct message and returns a query after responding to "hello, how are you today?"