forked from ChrisChrome/weather-bot
Async
This commit is contained in:
parent
498da05d55
commit
5e1635b9c1
2
index.js
2
index.js
|
@ -1146,7 +1146,7 @@ discord.on("interactionCreate", async (interaction) => {
|
||||||
files = [];
|
files = [];
|
||||||
sattelites[sat].forEach(async (imgData) => {
|
sattelites[sat].forEach(async (imgData) => {
|
||||||
// Get a buffer for the data, and put that in imageBuffers with the "name" as the key
|
// Get a buffer for the data, and put that in imageBuffers with the "name" as the key
|
||||||
await fetch(imgData.url).then((res) => {
|
fetch(imgData.url).then((res) => {
|
||||||
if (res.status !== 200) {
|
if (res.status !== 200) {
|
||||||
interaction.editReply({ content: "Failed to get satellite images", ephemeral: true });
|
interaction.editReply({ content: "Failed to get satellite images", ephemeral: true });
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue