Error With Chris PFP not showing up when not in the discord server.
This commit is contained in:
parent
249788ae8c
commit
a8aebe683c
10
index.js
10
index.js
|
@ -895,7 +895,7 @@ discord.on("interactionCreate", async (interaction) => {
|
||||||
const embed = {
|
const embed = {
|
||||||
title: "About Me!",
|
title: "About Me!",
|
||||||
thumbnail: {
|
thumbnail: {
|
||||||
url: discord.user.avatarURL()
|
url: discord.user?.avatarURL()
|
||||||
},
|
},
|
||||||
description: `I listen to all the weather.im rooms and send them to discord channels.\nI am open source, you can find my code [here!](https://github.com/ChrisChrome/iembot-2.0)\n\nThis bot is not affiliated with NOAA, the National Weather Service, or the IEM project.`,
|
description: `I listen to all the weather.im rooms and send them to discord channels.\nI am open source, you can find my code [here!](https://github.com/ChrisChrome/iembot-2.0)\n\nThis bot is not affiliated with NOAA, the National Weather Service, or the IEM project.`,
|
||||||
fields: [
|
fields: [
|
||||||
|
@ -926,7 +926,7 @@ discord.on("interactionCreate", async (interaction) => {
|
||||||
color: 0x00ff00,
|
color: 0x00ff00,
|
||||||
footer: {
|
footer: {
|
||||||
text: "Made by @chrischrome with <3",
|
text: "Made by @chrischrome with <3",
|
||||||
icon_url: discord.users.cache.get("289884287765839882").avatarURL()
|
icon_url: "https://cdn.discordapp.com/avatars/289884287765839882/2b00063a92adfe08f325353eee29e348.webp?size=1024&format=webp&width=0&height=5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
interaction.reply({ embeds: [embed] });
|
interaction.reply({ embeds: [embed] });
|
||||||
|
@ -1206,9 +1206,9 @@ discord.on("interactionCreate", async (interaction) => {
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "alertmap":
|
case "alertmap":
|
||||||
url = "https://forecast.weather.gov/wwamap/png/US.png"
|
const alertmapurl = "https://forecast.weather.gov/wwamap/png/US.png"
|
||||||
await interaction.deferReply();
|
await interaction.deferReply();
|
||||||
fetch(url).then((res) => {
|
fetch(alertmapurl).then((res) => {
|
||||||
if (res.status !== 200) {
|
if (res.status !== 200) {
|
||||||
interaction.editReply({ content: "Failed to get alert map", ephemeral: true });
|
interaction.editReply({ content: "Failed to get alert map", ephemeral: true });
|
||||||
return;
|
return;
|
||||||
|
@ -1218,7 +1218,7 @@ discord.on("interactionCreate", async (interaction) => {
|
||||||
embeds: [{
|
embeds: [{
|
||||||
title: `Alert Map`,
|
title: `Alert Map`,
|
||||||
image: {
|
image: {
|
||||||
url: `attachment://alerts.png`
|
alertmapurl: `attachment://alerts.png`
|
||||||
},
|
},
|
||||||
color: 0x00ff00
|
color: 0x00ff00
|
||||||
}],
|
}],
|
||||||
|
|
Loading…
Reference in a new issue