Fixing up session-id.js
This commit is contained in:
parent
2e67286825
commit
25772c9acc
@ -9,16 +9,17 @@ module.exports = {
|
|||||||
run: async (client, interaction) => {
|
run: async (client, interaction) => {
|
||||||
const file = './cache/' + interaction.user.id
|
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.');
|
if (err) return interaction.editReply('Please create a session using /create-session.');
|
||||||
|
|
||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
.setColor("#FF0000")
|
.setColor("#FF0000")
|
||||||
.setTitle("New Chat Session Started!")
|
.setTitle("Your current session ID")
|
||||||
.setDescription(`Current Session ID: \n` + obj.id)
|
.setDescription(`**Session ID:** \`${session.id}\`\n\nThe above ID is a unique session memories are stored for processing.`)
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setFooter({ text: `Requested by ${interaction.user.tag}`, iconURL: `${interaction.user.displayAvatarURL()}` });
|
.setFooter({ text: `Requested by ${interaction.user.tag}`, iconURL: `${interaction.user.displayAvatarURL()}` });
|
||||||
interaction.followUp({ embeds: [embed] });
|
|
||||||
|
interaction.followUp({ embeds: [embed] });
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user