This commit is contained in:
Christopher Cookman 2024-05-19 10:26:51 -06:00
parent b49d1c9a58
commit 6332006702
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -1226,7 +1226,7 @@ discord.on("interactionCreate", async (interaction) => {
if (day < 0 || day > 7) return interaction.reply({ content: "Invalid day", ephemeral: true }); if (day < 0 || day > 7) return interaction.reply({ content: "Invalid day", ephemeral: true });
if (type !== "fire" && type !== "storm") return interaction.reply({ content: "Invalid type", ephemeral: true }); if (type !== "fire" && type !== "storm") return interaction.reply({ content: "Invalid type", ephemeral: true });
url = outlookURLs[type][day]; url = outlookURLs[type][day];
await interaction.deferReply({ ephemeral: true }); await interaction.deferReply();
fetch(url).then((res) => { fetch(url).then((res) => {
if (res.status !== 200) { if (res.status !== 200) {
interaction.editReply({ content: "Failed to get outlook", ephemeral: true }); interaction.editReply({ content: "Failed to get outlook", ephemeral: true });
@ -1245,8 +1245,7 @@ discord.on("interactionCreate", async (interaction) => {
files: [{ files: [{
attachment: buffer, attachment: buffer,
name: `${type}_${day}.png` name: `${type}_${day}.png`
}], }]
ephemeral: false
}); });
}); });
}).catch((err) => { }).catch((err) => {