feat: add admin command with stats subcommand and integrate dsxjs dependency
This commit is contained in:
parent
9583267f64
commit
7089d8ad28
7 changed files with 90 additions and 7 deletions
12
cmd/user.ts
12
cmd/user.ts
|
@ -42,12 +42,12 @@ export const execute = async (interaction: ChatInputCommandInteraction) => {
|
|||
const totalSize = files.reduce((a, b) => a + b.size, 0);
|
||||
|
||||
const embed = createEmbed(user)
|
||||
.setDescription("Here's your overview:")
|
||||
.addFields(
|
||||
{ name: "Uploads", value: `${files.length} files`, inline: true },
|
||||
{ name: "Uploaded", value: `${formatSize(totalSize)} / 15 GB (${(totalSize / (15 * 1024 * 1024 * 1024)).toFixed(2)}%)`, inline: true },
|
||||
{ name: "Plan", value: `Free`, inline: true }
|
||||
)
|
||||
.setDescription("here's your account info:")
|
||||
.addFields([
|
||||
{ name: "uploads", value: `${files.length} files` },
|
||||
{ name: "uploaded", value: `${formatSize(totalSize)} / 15 GB (${(totalSize / (15 * 1024 * 1024 * 1024)).toFixed(2)}%)` },
|
||||
{ name: "plan", value: `free` }
|
||||
].map(field => ({ ...field, inline: true })))
|
||||
|
||||
await interaction.reply({ embeds: [embed] });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue