Discord
最新の更新:2023-12-21

Discord

You can integrate Bot services into your Discord application, allowing users in your Discord server to communicate with the Bot through this application.

Create Discord Application

image-20231221113019757

Visit the Discord Developer Portal and click on "New Application" to create your Discord application.

Configure Discord Application

image-20231221113340790

Go to "Bot", find "Privileged Gateway Intents", turn on all three "Intents", and save.

image-20231221113617087

Still on the "Bot" page, click "Reset Token" to get a TOKEN, and copy it.

image-20231222161346359

Return to GPTBots, go to "Integration - Discord", and paste the copied TOKEN.

image-20231221113835738

Go to "General Information", find "PUBLIC KEY", and copy it.

image-20231222161413057

Return to GPTBots, enter "Integration - Discord", fill in the copied PUBLIC KEY, click "Submit" to get the "INTERACTIONS ENDPOINT URL", and copy it.

Note: "PUBLIC KEY" and "INTERACTIONS ENDPOINT URL" are optional, but it is recommended that you fill them in.

image-20231221114059102

Return to "General Information", fill in the "INTERACTIONS ENDPOINT URL", and save.

image-20231221114541316

Go to "OAuth2 - General", set "AUTHORIZATION METHOD" to "In-app Authorization", check "bot" in "SCOPES", check "Administrator" in "BOT PERMISSIONS", and save.

At this point, the configuration process for the Discord application is complete.

Add the Application to the Server

You need to first add the Discord application to the Discord server before users in the server can use this Bot.

image-20231221114920830

Go to "OAuth2 - URL Generator", check "bot" in "SCOPES", and "Administrator" in "BOT PERMISSIONS".

image-20231221115038920

Then, you will get a URL at the bottom of the page, copy it.

Visit this URL to allow any server administrator to add this application to the server.

Conversing with the Bot in the Server

In the chat input box, you can converse with the Bot by typing "@Bot".

Conversing with the Bot via Private Message

Find the application in the server user list and send a message to converse with the Bot.

Attention

If your Discord Bot does not generate any conversations within 168 hours (7 days), it will automatically go offline. There are two ways to get your Discord Bot back online.

Restart the Bot's Discord service

image-20240219153047597

Go to "Bot Integration", find "Discord", turn it off and on again.

/start command

If you have filled in the "PUBLIC KEY" and "INTERACTIONS ENDPOINT URL", you can use the /start command in Discord to activate the Discord Bot that is offline.

image-20231228105001648

You can activate it online in the chat window through the /start command.