validate: Provide api version in req URL

This commit is contained in:
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

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;