Fixing up session-id.js

This commit is contained in:
Raven Scott 2023-03-26 02:00:34 +02:00
parent 2e67286825
commit 25772c9acc
1 changed files with 8 additions and 7 deletions

View File

@ -9,16 +9,17 @@ module.exports = {
run: async (client, interaction) => {
const file = './cache/' + interaction.user.id
jsonfile.readFile(file, function (err, obj) {
jsonfile.readFile(file, function (err, session) {
if (err) return interaction.editReply('Please create a session using /create-session.');
const embed = new EmbedBuilder()
.setColor("#FF0000")
.setTitle("New Chat Session Started!")
.setDescription(`Current Session ID: \n` + obj.id)
.setTimestamp()
.setFooter({ text: `Requested by ${interaction.user.tag}`, iconURL: `${interaction.user.displayAvatarURL()}` });
interaction.followUp({ embeds: [embed] });
.setColor("#FF0000")
.setTitle("Your current session ID")
.setDescription(`**Session ID:** \`${session.id}\`\n\nThe above ID is a unique session memories are stored for processing.`)
.setTimestamp()
.setFooter({ text: `Requested by ${interaction.user.tag}`, iconURL: `${interaction.user.displayAvatarURL()}` });
interaction.followUp({ embeds: [embed] });
})
},