updated badges
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
const {
|
||||
EmbedBuilder
|
||||
} = require(
|
||||
"discord.js"
|
||||
);
|
||||
|
||||
const {
|
||||
requireProfileOwner
|
||||
} = require(
|
||||
"../../utils/profileSystem"
|
||||
);
|
||||
|
||||
function delay(
|
||||
ms
|
||||
) {
|
||||
return new Promise(
|
||||
resolve =>
|
||||
setTimeout(
|
||||
resolve,
|
||||
ms
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
name:
|
||||
"profileClose",
|
||||
|
||||
async execute(
|
||||
interaction
|
||||
) {
|
||||
const context =
|
||||
await requireProfileOwner(
|
||||
interaction
|
||||
);
|
||||
|
||||
if (!context) {
|
||||
return;
|
||||
}
|
||||
|
||||
await interaction.update({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setTitle(
|
||||
"Profile Closed"
|
||||
)
|
||||
.setDescription(
|
||||
"Closing profile..."
|
||||
)
|
||||
],
|
||||
components: []
|
||||
});
|
||||
|
||||
await delay(1200);
|
||||
|
||||
try {
|
||||
await interaction.deleteReply();
|
||||
} catch {}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user