forked from ChrisChrome/weather-bot
Buh
This commit is contained in:
parent
14faf62e90
commit
b86eabcf1b
5
index.js
5
index.js
|
@ -1234,7 +1234,7 @@ discord.on("interactionCreate", async (interaction) => {
|
||||||
}
|
}
|
||||||
// Returns image, send embed with image as attachment (we need to bypass discord cache)
|
// Returns image, send embed with image as attachment (we need to bypass discord cache)
|
||||||
res.buffer().then(async (buffer) => {
|
res.buffer().then(async (buffer) => {
|
||||||
const message = {
|
interaction.editReply({
|
||||||
embeds: [{
|
embeds: [{
|
||||||
title: `${toTitleCase(type)} Outlook Day ${day}`,
|
title: `${toTitleCase(type)} Outlook Day ${day}`,
|
||||||
image: {
|
image: {
|
||||||
|
@ -1246,8 +1246,7 @@ discord.on("interactionCreate", async (interaction) => {
|
||||||
attachment: buffer,
|
attachment: buffer,
|
||||||
name: `${type}_${day}.png`
|
name: `${type}_${day}.png`
|
||||||
}]
|
}]
|
||||||
}
|
});
|
||||||
interaction.editReply({ embeds: [embed], files: [attachment] });
|
|
||||||
});
|
});
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
interaction.editReply({ content: "Failed to get outlook", ephemeral: true });
|
interaction.editReply({ content: "Failed to get outlook", ephemeral: true });
|
||||||
|
|
Loading…
Reference in a new issue