Skip to content

Commit 3c0b9f2

Browse files
Smol fix
1 parent 0c8e1d8 commit 3c0b9f2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Ep_14/commands/info/instagram.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@ module.exports = {
1818
}
1919

2020
const url = `https://instagram.com/${name}/?__a=1`;
21-
const res = await fetch(url).then(url => url.json());
21+
22+
let res;
2223

23-
if (!res.graphql.user.username) {
24+
try {
25+
await fetch(url).then(url => url.json());
26+
} catch (e) {
2427
return message.reply("I couldn't find that account... :(")
2528
.then(m => m.delete(5000));
2629
}

0 commit comments

Comments
 (0)