diff --git a/README.md b/README.md index 4de1409..80774f0 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ git clone https://github.com/discord/discord-example-app.git Then navigate to its directory and install dependencies: ``` -cd discord-getting-started +cd discord-example-app npm install ``` ### Get app credentials diff --git a/utils.js b/utils.js index 578617c..d7b2881 100644 --- a/utils.js +++ b/utils.js @@ -17,7 +17,7 @@ export function VerifyDiscordRequest(clientKey) { export async function DiscordRequest(endpoint, options) { // append endpoint to root API URL - const url = 'https://discord.com/api/v9/' + endpoint; + const url = 'https://discord.com/api/v10/' + endpoint; // Stringify payloads if (options.body) options.body = JSON.stringify(options.body); // Use node-fetch to make requests @@ -25,6 +25,7 @@ export async function DiscordRequest(endpoint, options) { headers: { Authorization: `Bot ${process.env.DISCORD_TOKEN}`, 'Content-Type': 'application/json; charset=UTF-8', + 'User-Agent': 'DiscordBot (https://github.com/discord/discord-example-app, 1.0.0)', }, ...options });