The White Teacher Discord Bot is a powerful bot designed to integrate AI-based responses into your Discord server. It utilizes OpenAI’s GPT model to generate human-like responses based on user queries. This bot can be customized to fit a wide range of use cases, such as interactive Q&A, educational assistance, or general information retrieval.
- AI-Powered Responses: The bot utilizes OpenAI’s GPT models to generate accurate and context-aware responses.
- Command-Based Interaction: Users trigger responses by typing commands starting with
=
. - Channel-Specific Interaction: The bot operates in a designated channel, ensuring focused interaction.
- Error Handling: In case of API errors, the bot provides appropriate feedback.
Before running the bot, ensure you have the following:
-
Discord Bot Token: Obtain from Discord Developer Portal.
-
OpenAI API Key: Obtain from OpenAI to use their API.
-
Moderation Tools Kick & Ban Commands: Admins can kick or ban users with kick and ban commands. Role Management: Commands like add, remove, mute, and unmute allow server admins to manage user roles and permissions effectively. Message Deletion: The purge command enables admins to delete a bulk of messages for keeping the channel clean. Warnings & Logs: Users can be warned using the warn command, and warnings can be purged using purgewarns.
-
Clone the Repository:
git clone https://github.com/sudoytext/White-Teacher.git cd White-Teacher
-
Create
.env
File:nano .env
Add your bot token and OpenAI API key:
DISCORD_BOT_TOKEN=your-discord-bot-token AI_API_KEY=your-openai-api-key
-
Install Dependencies:
npm install
-
Run the Bot:
node index.js
- CHANNEL_ID: The bot listens to messages in the specified Discord channel. You can change the
CHANNEL_ID
variable in theindex.js
file to target different channels.
- Invite the bot to your server using the OAuth2 URL from the Discord Developer Portal.
- In your Discord server, use the command
=hello
or any other message starting with=
to interact with the bot. - The bot will respond with AI-generated replies based on the input.
If there are any issues with the OpenAI API or unexpected errors, the bot will send an error message to the channel, informing the user of the issue.
This project is licensed under the MIT License.
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch
. - Commit your changes:
git commit -m 'Add some feature'
. - Push to the branch:
git push origin feature-branch
. - Submit a pull request.
- GitHub: SudoyText
- Discord: [username:ytext]