Skip to content

fac31/mohammed-anxhela-discord-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord AI Chatbot 🤖💻📱

What is this project about?

Mohamed and Anxhela's chatbot utilizing ChatGPT, deployed within Discord servers. The aim of this project is to create a chatbot for Discord servers and by deploying ChatGPT in Discord, we aim to enrich communication and engagement among users. Further information on the project brief can be found here.

What tools do you need in order to set it up locally?

  1. Obtain API Key: Sign up for a free API Key at OpenAI.
  2. Create Discord Bot: Create a bot on Discord Developers. Assign necessary permissions (ensure you select bot and applications.commands) and generate a URL.
  3. Invite Bot to Server: Invite your bot to a server you manage by pasting the generated link.
  4. Get Bot Token: Obtain your bot's token.
  5. Clone Repository:
- git clone https://github.com/fac31/mohammed-anxhela-discord-bot
  1. Install Dependencies:
- npm install
  1. Set Environment Variables: Create a .env file in the root directory and enter your API Key and Discord Token:
- TOKEN=ENTER-TOKEN-HERE
- API_KEY=ENTER-API-KEY-HERE
  1. Launch Bot: Start your bot in the terminal to bring it online: node index.js

What are the available commands that I can use?

  • !help: provides information about the available commands.
  • !hello: it typically triggers a response from the bot or system, which could be a simple greeting message like "Hello!".
  • !quote: retrieves a random quote from a collection. It's a fun way to share inspiring, humorous, or thought-provoking quotes within a community.
  • !calculate: perform calculations or mathematical operations within a chat.
  • !pong: used to check the responsiveness or latency of a network connection to a server. When you send !ping to the bot, it will respond with a 'pong'.
  • !senddm: used to send a direct message (DM) to another user privately. Example: !senddm @Angelab
  • !createchannel: used to create a private channel.

Any additional features?

  • Response Splitting: Our Discord bot splits responses into two messages if they exceed 3000 characters, ensuring readability and preventing message truncation.
  • Content Moderation: The bot actively monitors and removes inappropriate messages, maintaining a positive and safe environment for all users.
  • User Muting: In cases where inappropriate behavior persists, the bot automatically mutes the offending user for 5 minutes, enforcing community guidelines and promoting respectful interactions.

What are some development practices that we followed?

We used ESLint and Prettier that help with maintaining consistent code formatting and style, identifying errors, enforcing coding standards, and improving overall code quality. They can catch syntax errors, enforce coding conventions, and automatically format code according to predefined rules, making codebases more manageable and readable, especially in collaborative settings.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published