This commit is contained in:
Raven 2024-10-04 04:18:54 -04:00
parent d676ca2c98
commit 335dcda79d

View File

@ -47,19 +47,17 @@ async function resetConversationIfExpired(userId) {
const response = await axios.post(`${process.env.API_PATH}/reset-conversation`, {}, { const response = await axios.post(`${process.env.API_PATH}/reset-conversation`, {}, {
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'x-forwarded-for-id': interaction.user.id, 'x-forwarded-for-id': userId,
'x-forwarded-for-name': interaction.user.username
} }
}); });
console.log(response.status); console.log(response.status);
interaction.reply({ content: 'Conversation reset successfully.', ephemeral: isEphemeral(interaction.user.id) }); console.log(`Conversation history reset for user ${userId} due to inactivity.`);
} catch (error) { } catch (error) {
console.log(error); console.log(error);
interaction.reply({ content: 'Failed to reset the conversation.', ephemeral: isEphemeral(interaction.user.id) }); console.log(`Conversation history failed to reset for user ${userId} due to inactivity.`);
} }
console.log(`Conversation history reset for user ${userId} due to inactivity.`);
} }
} }