validate: Provide api version in req URL

master
ivan k 2019-02-21 14:00:49 -08:00 committed by GitHub
parent 9cd592d30f
commit 08ce6e6667
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
async function validateCommunity(community) {
while (true) {
const req = await fetch(`https://discordapp.com/api/invite/${community.inviteCode}`);
const req = await fetch(`https://discordapp.com/api/v6/invite/${community.inviteCode}`);
const response = await req.json();
if (response.guild) break;