Development (#21)
diff --git a/src/api/index.ts b/src/api/index.ts
index c8b7b14..8d57f3d 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -61,7 +61,8 @@
},
list: {
member: entry(member.id, renderUser(member.user)),
- verified: entry(member.joinedTimestamp, renderDelta(member.joinedTimestamp!))
+ joined: entry(member.joinedTimestamp, renderDelta(member.joinedTimestamp!)),
+ verified: entry(Date.now(), renderDelta(Date.now()))
},
hidden: {
guild: guild.id
diff --git a/src/commands/settings/autopublish.ts b/src/commands/settings/autopublish.ts
index e851c35..2c01fe2 100644
--- a/src/commands/settings/autopublish.ts
+++ b/src/commands/settings/autopublish.ts
@@ -2,9 +2,9 @@
import type Discord from "discord.js";
import client from "../../utils/client.js";
import { LoadingEmbed } from "../../utils/defaults.js";
-import compare from "lodash"
import EmojiEmbed from "../../utils/generateEmojiEmbed.js";
import getEmojiByName from "../../utils/getEmojiByName.js";
+import _ from "lodash";
export const command = new SlashCommandSubcommandBuilder()
.setName("autopublish")
@@ -19,7 +19,7 @@
let closed = false;
let config = await client.database.guilds.read(interaction.guild!.id);
- let data = Object.assign({}, config.autoPublish);
+ let data = _.cloneDeep(config.autoPublish);
do {
const buttons = new ActionRowBuilder<ButtonBuilder>()
.addComponents(
@@ -33,7 +33,7 @@
.setLabel("Save")
.setStyle(ButtonStyle.Success)
.setEmoji(getEmojiByName("ICONS.SAVE", "id") as APIMessageComponentEmoji)
- .setDisabled(compare.isEqual(data, config.autoPublish))
+ .setDisabled(_.isEqual(data, config.autoPublish))
);
const channelSelect = new ActionRowBuilder<ChannelSelectMenuBuilder>()
@@ -78,7 +78,7 @@
case "save": {
await client.database.guilds.write(interaction.guild!.id, { "autoPublish": data });
config = await client.database.guilds.read(interaction.guild!.id);
- data = Object.assign({}, config.autoPublish);
+ data = _.cloneDeep(config.autoPublish);
break;
}
}