@discordjs/rest 1.7.2-dev.1683331765-e627468.0 → 1.7.2-dev.1683418204-37181ab.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -23,7 +23,7 @@
23
23
 
24
24
  ## Installation
25
25
 
26
- **Node.js 16.9.0 or newer is required.**
26
+ **Node.js 18.12.0 or newer is required.**
27
27
 
28
28
  ```sh
29
29
  npm install @discordjs/rest
@@ -80,6 +80,25 @@ try {
80
80
  }
81
81
  ```
82
82
 
83
+ Send a basic message in an edge environment:
84
+
85
+ ```js
86
+ import { REST } from '@discordjs/rest';
87
+ import { Routes } from 'discord-api-types/v10';
88
+
89
+ const rest = new REST({ version: '10', makeRequest: fetch }).setToken(TOKEN);
90
+
91
+ try {
92
+ await rest.post(Routes.channelMessages(CHANNEL_ID), {
93
+ body: {
94
+ content: 'A message via REST from the edge!',
95
+ },
96
+ });
97
+ } catch (error) {
98
+ console.error(error);
99
+ }
100
+ ```
101
+
83
102
  ## Links
84
103
 
85
104
  - [Website][website] ([source][website-source])