2024-09-26 03:22:22 +00:00
|
|
|
module.exports = class InteractionStorage {
|
|
|
|
constructor(idString, interaction) {
|
|
|
|
this.idString = idString;
|
2024-09-26 12:27:11 +00:00
|
|
|
this.userId = interaction.user.id;
|
2024-09-26 03:22:22 +00:00
|
|
|
|
|
|
|
// Store in the client
|
|
|
|
interaction.client.iStorage.set(idString, this);
|
|
|
|
|
|
|
|
// Delete this from the interactionStorage after 5 minutes
|
|
|
|
setTimeout(() => {
|
2024-09-26 12:09:09 +00:00
|
|
|
console.log(`Deleting interactionStorage with id: ${idString}`);
|
2024-09-26 03:22:22 +00:00
|
|
|
interaction.client.iStorage.delete(idString);
|
|
|
|
}, 300000);
|
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|