@discordjs/rest is a module that allows you to easily make REST requests to the Discord API.
Node.js 16.11.0 or newer is required.
Note: native fetch (not recommended) is unavailable in this node version, either use a newer node version or use the more performant
undiciRequest strategy (default)
Install all required dependencies:
Send a basic message:
Create a thread from an existing message to be archived after 60 minutes of inactivity:
Send a basic message in an edge environment:
- Website (source)
- Guide (source) Also see the v13 to v14 Update Guide, which includes updated and removed items from the library.
- discord.js Discord server
- Discord API Discord server
- Related libraries
If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official discord.js Server.