forked from ChrisChrome/weather-bot
Fix that
This commit is contained in:
parent
7c1707e4c6
commit
47614c7850
48
index.js
48
index.js
|
@ -328,34 +328,32 @@ discord.on("interactionCreate", async (interaction) => {
|
||||||
// Send an embed showing info about the bot, including number of guilds, number of subscribed rooms, etc
|
// Send an embed showing info about the bot, including number of guilds, number of subscribed rooms, etc
|
||||||
let guilds = discord.guilds.cache.size;
|
let guilds = discord.guilds.cache.size;
|
||||||
let channels = 0;
|
let channels = 0;
|
||||||
await db.run(`SELECT COUNT(*) FROM channels`, (err, row) => {
|
await db.get(`SELECT COUNT(*) as count FROM channels`, (err, row) => {
|
||||||
if (err) {
|
channels = row.count
|
||||||
console.error(err.message);
|
const embed = {
|
||||||
}
|
title: "About Me!",
|
||||||
channels = row[0];
|
thumbnail: {
|
||||||
});
|
url: discord.user.avatarURL()
|
||||||
const embed = {
|
|
||||||
title: "About Me!",
|
|
||||||
thumbnail: {
|
|
||||||
url: discord.user.avatarURL()
|
|
||||||
},
|
|
||||||
description: `I am a bot that listens to weather.im alerts and sends them to discord channels.\nI am open source, you can find my code [here!](https://github.com/ChrisChrome/iembot-2.0)`,
|
|
||||||
fields: [
|
|
||||||
{
|
|
||||||
name: "Guilds",
|
|
||||||
value: guilds
|
|
||||||
},
|
},
|
||||||
{
|
description: `I am a bot that listens to weather.im alerts and sends them to discord channels.\nI am open source, you can find my code [here!](https://github.com/ChrisChrome/iembot-2.0)`,
|
||||||
name: "Subscribed Rooms",
|
fields: [
|
||||||
value: channels
|
{
|
||||||
|
name: "Guilds",
|
||||||
|
value: guilds
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Subscribed Rooms",
|
||||||
|
value: channels
|
||||||
|
}
|
||||||
|
],
|
||||||
|
color: 0x00ff00,
|
||||||
|
footer: {
|
||||||
|
text: "Made by @chrischrome with <3",
|
||||||
|
icon_url: discord.users.cache.get("289884287765839882").avatarURL()
|
||||||
}
|
}
|
||||||
],
|
|
||||||
color: 0x00ff00,
|
|
||||||
footer: {
|
|
||||||
text: "Made by @chrischrome with <3",
|
|
||||||
icon_url: discord.users.cache.get("289884287765839882").avatarURL()
|
|
||||||
}
|
}
|
||||||
}
|
interaction.reply({ embeds: [embed]});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue