Skip to main content

For use with the Discord API, which provides an interface that allows you to program bots and other applications for Discord messaging services. If asking about a specific API wrapper, please tag the library as well.

Discord is a chat platform that supports the web, desktop, and mobile. Originally designed mostly for gamers, it supports instant messaging, voice calls, and video calls. The Discord API interfaces with Discord and allows programmers to make bots and other applications that integrate with Discord.

While Discord does not maintain any official libraries, it maintains a curated list of various libraries for its API for various languages.

To get started, developers must create a developer application, which will allow them to authenticate with the Discord API either via OAuth2 or a bot token.

Bots are the most common way to interact with Discord and typically respond to messages starting with a particular prefix such as !ping. However, in late 2020, ‘interactions’ were introduced — a new way for applications to interact with Discord that does not require a bot user. These include application commands (including slash commands like /ping and context menu commands when right-clicking on a user or message) and message components (buttons, select menus, and text inputs on messages that users can interact with).

Discord also supports webhooks that do not require authentication and allow developers to post messages in a particular channel.

As it was originally designed for gamers, game developers can also integrate with Discord via its GameSDK to provide a rich presence for users currently playing the game, integrate multiplayer features with Discord, etc.