fac30sb / discord-chatbot-emma-egbie

0 stars 0 forks source link

Fixed the following issues #32

Closed blackNoir2 closed 8 months ago

blackNoir2 commented 9 months ago

Issue Summary:

The Discord bot lost its ability to send direct messages to users after gaining a new cool feature to listen to all prompts and check for violations. This issue has been resolved.

Resolution:

After restoring its ability to send direct messages, the Discord bot encountered a problem processing commands that allowed users to view their past chats with OpenAI and ask the bot questions. This occurred because the commands to view chat history and ask questions were being sent as direct messages. The root cause was that the command structure for sending direct messages, asking questions to the bot, and viewing previous chats was identical, differing only in the command name. For example, to send a message to a user:

Command to send a message:

Command to view chat history:

Command to ask the bot a question:

This resulted in the bot treating all commands as direct messages.

Issue Resolution: The problem has been fixed.

New Issue:

After resolving the initial issues, a new problem emerged: the bot started querying the openAi after each command was executed. For instance, if a user sent a message to another user, the message was sent, and then the result was queried and displayed on the screen. The same occurred when requesting chat history. The chat history was displayed as requested, followed by a message stating that as an OpenAI bot, it could not retrieve user chats.

Fixed: All mentioned issues have been resolved.

  1. Users can now send direct messages without their messages being queried.
  2. Users can request to view their chat history without their requests being queried.

New feature added

Added the ability for the bot to automatically delete speech that violates it terms and conditions.

electricblues commented 9 months ago

Just for clarification: Why are we adding extra logic for the user to send direct messages? So that we can moderate them in case they violate speech?