ChatGPT was asked to create a Discord bot


Maximilian Herr

August 20, 2023 at 09:00

0

ChatGPT was asked to create a Discord bot

In this format titled ‘We asked ChatGPT‘, we explore the different use cases of this tool, which has become a true companion in so many areas. It can accomplish a lot of tasks, like creating a mobile app or a website. Knowing different programming languages, we could do almost anything with it, even things we thought were impossible for us. Today we will cover how to create a Discord bot and how to develop it.

It can do many things, build a mobile app or a website. Knowing different programming languages, we could do almost anything, even things we thought were impossible for us. Well today we will cover the creation of a Discord bot, and its development.

Creating a bot by an AI, the beginning of the end?

Say like that, it can be scary. Imagine if possible, an AI that creates a Discord bot; it is quite simply the beginning of the end of humanity, of course! Let’s stop being pessimistic. A Discord bot won’t destroy humanity for sure, but it’s interesting to see the capabilities of this generative AI that is on everyone’s lips. After all, who has never thought of a Discord bot to enhance a private Discord server with friends?

ChatGPT Bot Discord initial prompt

Lacking inspiration, let’s first ask ChatGPT if it’s possible for him to code a Discord bot for us. It will be a bot that responds with random kindness when called. Quickly, ChatGPT tells us a series of steps to follow and a piece of Python code that will do the trick. The number of compliments being low for our taste, we ask him for 100, which we replace in the code he gave us previously.

But what do we do now?

In this series of articles, we consider as often as possible that we are uninitiated in anything. Well, quite simply, we have code, and we don’t know where to put it. So, we ask ChatGPT what we should do! And it thus tells us that a procedure must be initiated on a link (which it also gives us), in order to create the profile of the bot which will be inviting. A key is also obtained by following these steps, to be indicated in our code to link the code to the newly created bot.

The steps to create the bot via the developer interface of Discord

The steps may seem tedious, but they were very precise, and allowed us to create the bot. Then, locally on the machine, we will launch the execution of the python file that ChatGPT provided us. Note however that as long as the file is launched, the bot is online, as soon as the execution of the file stops, the bot disconnects! So be sure to run it on a server if you want to see your bot permanently online. And from all that, we get a very convincing result, which allows us to meet the original requirement: to have a compliment on demand, as you can see in the result below.

ChatGPT Bot Discord result

Convincing, but basic, now what?

Some bots on Discord are very developed, with message moderation according to a database of possible malicious messages (insults, scams, etc.). You can also make calls to ChatGPT through its API, precisely to obtain results on demand via Discord. The limit here only comes from Discord’s capabilities and your imagination. The bot as it is is very simplistic, but you can clearly improve it.

ChatGPT

Download

ChatGPT

  • Chat in different languages, including French
  • Generate, translate and get a text summary
  • Generate, optimize and correct code

Developed by OpenAI, ChatGPT is a sophisticated conversational platform powered by the state-of-the-art GPT-4 language model. Using deep learning and artificial intelligence technologies, this GPT chatbot is able to decode and understand user queries. With its ability to produce text in a clever way, ChatGPT delivers personalized and relevant responses, ensuring an enhanced user experience and smooth chat interaction.

Developed by OpenAI, ChatGPT is a sophisticated conversational platform powered by the state-of-the-art GPT-4 language model. Using deep learning and artificial intelligence technologies, this GPT chatbot is able to decode and understand user queries. With its ability to produce text in a clever way, ChatGPT delivers personalized and relevant responses, ensuring an enhanced user experience and smooth chat interaction.



Source link -99