- Fix about command pfp
- Update sub/unsub command perms
This commit is contained in:
parent
dcf5518288
commit
04d3cb80e0
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
"name": "subscribe",
|
"name": "subscribe",
|
||||||
"description": "Subscribe to a weather.im room",
|
"description": "Subscribe to a weather.im room",
|
||||||
"default_member_permissions": 0,
|
"default_member_permissions": 16,
|
||||||
"options": [
|
"options": [
|
||||||
{
|
{
|
||||||
"name": "room",
|
"name": "room",
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
{
|
{
|
||||||
"name": "unsubscribe",
|
"name": "unsubscribe",
|
||||||
"description": "Unsubscribe from a weather.im room",
|
"description": "Unsubscribe from a weather.im room",
|
||||||
"default_member_permissions": 0,
|
"default_member_permissions": 16,
|
||||||
"options": [
|
"options": [
|
||||||
{
|
{
|
||||||
"name": "room",
|
"name": "room",
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
{
|
{
|
||||||
"name": "list",
|
"name": "list",
|
||||||
"description": "List all subscribed rooms for this channel",
|
"description": "List all subscribed rooms for this channel",
|
||||||
"default_member_permissions": 0
|
"default_member_permissions": 16
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "about",
|
"name": "about",
|
||||||
|
|
74
index.js
74
index.js
|
@ -687,7 +687,7 @@ discord.on('ready', async () => {
|
||||||
await (async () => {
|
await (async () => {
|
||||||
try {
|
try {
|
||||||
//Global
|
//Global
|
||||||
if(config.debug >= 1) console.log(`${colors.magenta("[DEBUG]")} Registering global commands: ${JSON.stringify(commands, null, 2)}`);
|
if (config.debug >= 1) console.log(`${colors.magenta("[DEBUG]")} Registering global commands: ${JSON.stringify(commands, null, 2)}`);
|
||||||
await rest.put(Routes.applicationCommands(discord.user.id), { body: commands })
|
await rest.put(Routes.applicationCommands(discord.user.id), { body: commands })
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
@ -892,44 +892,46 @@ discord.on("interactionCreate", async (interaction) => {
|
||||||
await getUniqueChannels().then((unique) => {
|
await getUniqueChannels().then((unique) => {
|
||||||
uniques = unique;
|
uniques = unique;
|
||||||
});
|
});
|
||||||
const embed = {
|
discord.users.fetch("289884287765839882").then((chrisUser) => {
|
||||||
title: "About Me!",
|
const embed = {
|
||||||
thumbnail: {
|
title: "About Me!",
|
||||||
url: discord.user?.avatarURL()
|
thumbnail: {
|
||||||
},
|
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.`,
|
|
||||||
fields: [
|
|
||||||
{
|
|
||||||
name: "Uptime",
|
|
||||||
value: `Since <t:${Math.floor(startTimestap / 1000)}>, Started <t:${Math.floor(startTimestap / 1000)}:R>`,
|
|
||||||
},
|
},
|
||||||
{
|
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.`,
|
||||||
name: "Caught Messages",
|
fields: [
|
||||||
value: `Got ${messages.toLocaleString()} messages since startup`,
|
{
|
||||||
},
|
name: "Uptime",
|
||||||
{
|
value: `Since <t:${Math.floor(startTimestap / 1000)}>, Started <t:${Math.floor(startTimestap / 1000)}:R>`,
|
||||||
name: "Guilds",
|
},
|
||||||
value: guilds.toLocaleString(),
|
{
|
||||||
inline: true
|
name: "Caught Messages",
|
||||||
},
|
value: `Got ${messages.toLocaleString()} messages since startup`,
|
||||||
{
|
},
|
||||||
name: "Subscribed Rooms",
|
{
|
||||||
value: channels.toLocaleString(),
|
name: "Guilds",
|
||||||
inline: true
|
value: guilds.toLocaleString(),
|
||||||
},
|
inline: true
|
||||||
{
|
},
|
||||||
name: "Unique Channels",
|
{
|
||||||
value: uniques.toLocaleString(),
|
name: "Subscribed Rooms",
|
||||||
inline: true
|
value: channels.toLocaleString(),
|
||||||
|
inline: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Unique Channels",
|
||||||
|
value: uniques.toLocaleString(),
|
||||||
|
inline: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
color: 0x00ff00,
|
||||||
|
footer: {
|
||||||
|
text: "Made by @chrischrome with <3",
|
||||||
|
icon_url: chrisUser.avatarURL()
|
||||||
}
|
}
|
||||||
],
|
|
||||||
color: 0x00ff00,
|
|
||||||
footer: {
|
|
||||||
text: "Made by @chrischrome with <3",
|
|
||||||
icon_url: "https://cdn.discordapp.com/avatars/289884287765839882/2b00063a92adfe08f325353eee29e348.webp?size=1024&format=webp&width=0&height=256"
|
|
||||||
}
|
}
|
||||||
}
|
interaction.reply({ embeds: [embed] });
|
||||||
interaction.reply({ embeds: [embed] });
|
})
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "rooms":
|
case "rooms":
|
||||||
|
|
Loading…
Reference in a new issue