Discord提供了多种功能供普通用户和开发人员试用。如果您属于后一个用户组,您可能想要创建一个Discord 机器人(Discord bot)。
对于开发人员,该应用程序提供了一种称为开发人员模式的模式。如果您正在寻找创建Discord机器人,此开发者模式将为您提供制作机器人所需的ID(IDs)。
您可以在所有 Discord 支持的设备上启用和使用 Discord 的开发者模式。
启用 Discord 开发者模式(Enable Discord Developer Mode)
激活 Discord 的开发者模式很容易,您可以在 Discord 的 Web 客户端、桌面应用程序、iOS 和Android应用程序上执行此操作。
Turn On Discord Developer Mode on Web/Desktop
在 Discord 的 Web 和桌面客户端上启用开发者模式的步骤几乎相同。
- 在 Web 浏览器或桌面应用程序中启动Discord 。
- 选择左下角的齿轮图标。(Gear Icon)
- 从左侧边栏中的应用程序设置(App Settings)下选择高级。(Advanced )
- 在右侧窗格中,启用开发人员模式(Developer Mode)选项。
Discord将在没有任何提示的情况下启用开发者模式。
在 iOS 上激活 Discord 开发者模式(Activate Discord Developer Mode on iOS)
在iOS 的Discord中,您可以打开一个选项以启用开发者模式。
- 在您的设备上打开Discord应用程序。确保您已登录您的帐户。点击左上角的汉堡菜单(三个水平线)。
- 当应用程序打开时,点击右下角的个人资料图标。
- 向下滚动菜单到App Settings部分,然后点击Appearance。
- 在以下屏幕上打开开发人员模式选项。(Developer Mode)
要禁用开发者模式,请关闭您在上面启用的选项。
在 Android 上启用 Discord 开发者模式(Enable Discord Developer Mode on Android)
(Discord)Android上的Discord提供了一个开关来打开和关闭开发者模式。
- 在您的 Android 设备上启动Discord 。
- 点击右下角的个人资料图标。
- 向下滚动菜单到应用程序设置(App Settings),然后点击行为(Behavior)。
- 启用开发者模式(Developer Mode)选项。
- 要禁用该模式,只需再次点击开发者模式(Developer Mode)选项。
使用 Discord 开发者模式(Use Discord Developer Mode)
Discord 的(uses of Discord’s)开发者模式最常见的用途之一是查找服务器、频道、用户和消息的唯一ID(IDs)。
开发人员(Developers)通常需要这些ID(IDs)来将他们的机器人与Discord集成。当机器人连接到Discord(Discord)时,这些ID(IDs)告诉机器人要与哪些项目进行交互。
您可以在所有 Discord 支持的设备上找到这些唯一ID 。(IDs)
获取 Discord 服务器的唯一 ID(Get the Unique ID for a Discord Server)
您需要唯一的服务器ID(IDs)来构建Discord机器人。您可以在 Discord(servers in Discord)中为您的任何服务器获取此 ID 。
Web/Desktop App:
- 启动Discord并确保您可以查看需要 ID 的服务器。
- 右键单击该服务器并选择Copy ID。
- 您选择的服务器的唯一 ID 现在在您的剪贴板上。
- 您可以通过将其粘贴到文本编辑器(如MS Word或记事本(Notepad))中来查看此 ID 。
iOS 应用程序:(iOS App:)
- 打开Discord应用程序,然后点击您想要其 ID 的服务器。
- 在服务器屏幕上,点击右上角的三点菜单(three-dots menu)。
- 向下滚动并点击复制 ID(Copy ID)。
- 将出现一条通知,说明已复制 ID(Copied ID)。该 ID 现在在您的剪贴板中可用,您可以将其粘贴到文本编辑器中,例如MS Word或记事本(Notepad)。
安卓应用:(Android App:)
- 访问Discord应用程序并找到您想要其 ID 的服务器。
- 点击(Tap)并按住服务器,然后选择更多选项(More Options)。
- 向下滚动并选择复制 ID(Copy ID)。
- 将出现一条消息说已复制到剪贴板(Copied to clipboard)。
复制 Discord 频道的唯一 ID(Copy the Unique ID for a Discord Channel)
与服务器一样,Discord频道也有唯一的ID(IDs)。您可以使用以下步骤访问它们:
Web/Desktop App:
- 启动Discord并访问您要为其复制 ID 的频道。
- 右键单击左侧管理下的通道,然后选择(Administration )复制 ID(Copy ID)。
iOS/Android App:
- 在您的设备上访问Discord中的频道列表。
- 点击并按住一个频道并选择复制 ID(Copy ID)以复制该频道的 ID。
检索 Discord 用户的唯一 ID(Retrieve the Unique ID for a Discord User)
您可以检索频道和朋友列表中用户的唯一 ID。
Web/Desktop App:
- 如果用户在某个频道中,请打开该频道,右键单击用户图标,然后选择Copy ID。
- 如果用户是您的朋友,请选择Friends,右键单击该用户,然后选择Copy ID。
iOS 应用程序:(iOS App:)
- 如果用户在频道中,请访问该频道,点击用户图标,点击三点菜单,然后选择复制 ID(Copy ID)。
- 如果该用户在您的朋友列表中,请点击底部的朋友图标,选择该用户,点击三点菜单,然后选择Copy ID。
安卓应用:(Android App:)
- 要获取频道中用户的 ID,请在其频道中点击该用户,向下滚动,然后点击Copy ID。
- 如果该用户在您的朋友列表中,请打开您的朋友列表,点击该用户,向下滚动,然后选择底部的复制 ID 。(Copy ID)
获取 Discord 消息的唯一 ID(Obtain the Unique ID for a Discord Message)
所有Discord 消息(Discord messages)还具有分配给它们的唯一 ID。您可以在台式机和移动设备上显示此 ID。
Web/Desktop App:
- 打开您的消息所在的消息线程。
- 将鼠标悬停(Hover)在您的消息上,选择消息旁边的三点菜单,然后选择Copy ID。
iOS/Android App:
- 打开您的消息线程并找到您想要其 ID 的消息。
- 点击(Tap)并按住消息,然后选择复制 ID(Copy ID)。
如果您是Discord开发的初学者,您可以查看如何构建 Discord 音乐机器人(how to build a Discord music bot)作为一个很好的起点。Discord有无限的可能性,您可以为它制作多种类型的机器人。
How to Enable and Use Developer Mode on Discord
Discord offers seνeral feаtures to try out for both regular users and developers. Іf you bеlong tо the latter user group, you might want to crеate a Discord bot.
For developers, the app offers a mode called developer mode. If you’re looking to create a Discord bot, this developer mode will provide you with the required IDs you need to make the bot.
You can enable and use Discord’s developer mode on all of Discord’s supported devices.
Enable Discord Developer Mode
Activating Discord’s developer mode is easy and you can do this on Discord’s web client, desktop app, iOS and Android apps.
Turn On Discord Developer Mode on Web/Desktop
The steps to enable developer mode on Discord’s web and desktop clients are pretty much the same.
- Launch Discord either in the web browser or on the desktop app.
- Select the Gear Icon at the lower-left corner.
- Select Advanced from under App Settings in the left sidebar.
- On the right pane, enable the Developer Mode option.
Discord will enable the developer mode without any prompts.
Activate Discord Developer Mode on iOS
In Discord for iOS, you can turn on an option to enable the developer mode.
- Open the Discord app on your device. Make sure you’re logged in to your account. Tap on the hamburger menu at the top left (three horizontal lines).
- When the app opens, tap your profile icon at the lower-right corner.
- Scroll down the menu to the App Settings section and tap Appearance.
- Turn on the Developer Mode option on the following screen.
To disable developer mode, toggle off the option that you enabled above.
Enable Discord Developer Mode on Android
Discord on Android offers a toggle to switch developer mode on and off.
- Launch Discord on your Android device.
- Tap your profile icon at the bottom-right corner.
- Scroll down the menu to App Settings and tap Behavior.
- Enable the Developer Mode option.
- To disable the mode, simply tap the Developer Mode option again.
Use Discord Developer Mode
One of the most common uses of Discord’s developer mode is to find the unique IDs for servers, channels, users, and messages.
Developers usually need these IDs to integrate their bots with Discord. These IDs tell the bots what items to interact with when the bots connect to Discord.
You can find these unique IDs on all of Discord’s supported devices.
Get the Unique ID for a Discord Server
You’ll need unique server IDs to build a Discord bot. You can get this ID for any of your servers in Discord.
Web/Desktop App:
- Launch Discord and ensure you can view the server for which you want the ID.
- Right-click that server and select Copy ID.
- The unique ID for your selected server is now on your clipboard.
- You can view this ID by pasting it in a text editor, like MS Word or Notepad.
iOS App:
- Open the Discord app and tap the server for which you want the ID.
- On the server screen, tap the three-dots menu at the top-right corner.
- Scroll down and tap Copy ID.
- A notification saying Copied ID will appear. The ID is now available in your clipboard and you can paste it into a text editor, like MS Word or Notepad.
Android App:
- Access the Discord app and find the server for which you want the ID.
- Tap and hold on the server and select More Options.
- Scroll down and select Copy ID.
- A message saying Copied to clipboard will appear.
Copy the Unique ID for a Discord Channel
Like servers, Discord channels also have unique IDs. You can access them using the following steps:
Web/Desktop App:
- Launch Discord and access the channel for which you want to copy the ID.
- Right-click the channel under Administration on the left and select Copy ID.
iOS/Android App:
- Access the channels list in Discord on your device.
- Tap and hold a channel and select Copy ID to copy that channel’s ID.
Retrieve the Unique ID for a Discord User
You can retrieve a unique ID for users in both your channels and friends list.
Web/Desktop App:
- If the user is in a channel, open that channel, right-click the user icon, and select Copy ID.
- If the user is your friend, select Friends, right-click the user, and choose Copy ID.
iOS App:
- If the user is in a channel, access that channel, tap the user icon, tap the three-dots menu, and select Copy ID.
- If the user is in your list of friends, tap the friends’ icon at the bottom, select the user, tap the three-dots menu, and choose Copy ID.
Android App:
- To get the ID for a user in a channel, tap that user in their channel, scroll down, and tap Copy ID.
- If the user is in your list of friends, open your friends’ list, tap the user, scroll down, and select Copy ID at the bottom.
Obtain the Unique ID for a Discord Message
All Discord messages also have a unique ID assigned to them. You can reveal this ID on both your desktop and mobile devices.
Web/Desktop App:
- Open the message thread where your message is located.
- Hover your mouse over your message, select the three-dots menu next to the message, and choose Copy ID.
iOS/Android App:
- Open your messages thread and locate the message for which you want the ID.
- Tap and hold the message and select Copy ID.
If you’re a beginner with Discord development, you can review how to build a Discord music bot as a good starting point. There are endless possibilities with Discord and you can make many types of bots for it.