SadharanLadkaIsBack / sadharanladkaisback.github.io

Home Page:https://sadharanladkaisback-github-io.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

● DarkImpulseX-DiscordAIBot


Example Usage - README Typing SVG

Discord GitHub contributors

Language CodeFactor




Maintainers


About

DarkImpulseX-DiscordAIBot is the all in one discord bot that you need. This is an AI Bot which integrates with openai as well as trains itself with new datasets. Manage your discord with this ultimate discord companion which can handle different things from playing music, chatting with people, making ready made templates and many more.
We are continuously developing to fit with the modern and developing world!



Documentation

DarkImpulseX-DiscordAIBot is a versatile discord bot. It is end-to-end trained to work in your server. It uses our language model as well as openai. Also it can use NLP to understand the language with which users are interacting.

  • Features
    • Responds to users query using openai 😎
    • Greets if anyone joins your discord channel with a joke πŸ˜‚
    • Joins and leaves voice channel πŸ“£
    • Play, stop, resume, previous and next music playing
    • Image generation
    • List commands
    • Discord Management
    • and more.......

Libraries Used

  • openai
  • discord.py
  • discord.py[voice] pip install discord.py[voice]
  • requests

Code Explanation

  • Prompt Engineering is very essential part to make a good AI chat application

While using the OpenAI API, we have used a very cool prompt so to give our bot a particular behaviour. See the code example below where we have told hpw the bot would behave and how it should give answers-

Snippet

  • Greeting User The bot checks the default text channel using the below code
guild.text_channels[0]

a "member" represents a user within the context of a specific server (guild) A "guild" is Discord's term for a server. It represents a collection of channels, roles, and members on Discord.

The bot greets the user by making requests to jokeapi - we appreciate it a lot.

  • Joins and leaves voice channel uses python discord.py[voice]

    • command to join - join We get the voice channel that user has joined with this code :-
    channel = message.author.voice.channel
    

    and stores the channel in self.voiceChannel.

    • command to leave - leave Leaves the channel on user command by using the same code above to get the channel

    • leaves automatically checks the number of users using the code

    len(self.voiceChannel.channel.members) == 1
    

    then, disconnects after waiting for 1 minute

We have developed our bot such that it takes into consideration those chats which mentions the bot while chatting.

Installation

All you need is python installed in your computer.

  • Add the bot to your server

  • Clone the repo

git clone https://github.com/Dark-Impulse-X/DarkImpulseX-DIscordAIBot.git
  • Install the libraries
pip install requirements.txt
  • Extra installation
pip install discord.py[voice]

How To Run?

  • Collect all the tokens and openai keys.

  • Make a .env file and make two variables TOKEN and OPENAI_API_KEY and store the value in it.

  • Run the main.py file from the src to run locally.

    python src/main.py
    
  • Invite the bot here

  • Enjoy your bot!

THE BOT WILL BE ONLINE UNTILL YOU CLOSE main.py ON YOUR PC!!!

How to make use of the bot?

  • Mention the bot whilist your message to get responses

Contributions

Contributions are accepted. Read the contribution guidelines before contributing and follow the rules properly.

License

DarkImpulseX-DiscordAIBot is licensed under the MIT License. You are permitted to use, copy, modify, distribute, sublicense, and sell copies of the software.

About

https://sadharanladkaisback-github-io.vercel.app

License:MIT License


Languages

Language:HTML 100.0%