♻️ credits balance
This commit is contained in:
parent
d0dd88b02b
commit
7ce2355cfb
1 changed files with 20 additions and 18 deletions
|
@ -1,17 +1,19 @@
|
||||||
// Dependencies
|
// Dependencies
|
||||||
import { CommandInteraction, ColorResolvable, MessageEmbed } from "discord.js";
|
import { CommandInteraction, MessageEmbed } from "discord.js";
|
||||||
|
|
||||||
// Configurations
|
|
||||||
import { colors, footer } from "../../../../../config.json";
|
|
||||||
|
|
||||||
// Helpers
|
|
||||||
import pluralize from "../../../../helpers/pluralize";
|
|
||||||
|
|
||||||
// Models
|
|
||||||
import fetchUser from "../../../../helpers/fetchUser";
|
|
||||||
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
|
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
|
||||||
|
|
||||||
// Function
|
// Configurations
|
||||||
|
import {
|
||||||
|
errorColor,
|
||||||
|
successColor,
|
||||||
|
footerText,
|
||||||
|
footerIcon,
|
||||||
|
} from "@config/embed";
|
||||||
|
|
||||||
|
// Helpers
|
||||||
|
import pluralize from "@helpers/pluralize";
|
||||||
|
import fetchUser from "@helpers/fetchUser";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data: (command: SlashCommandSubcommandBuilder) => {
|
data: (command: SlashCommandSubcommandBuilder) => {
|
||||||
return command
|
return command
|
||||||
|
@ -24,7 +26,7 @@ export default {
|
||||||
.setRequired(false)
|
.setRequired(false)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
execute: async (interaction: CommandInteraction, tools: any) => {
|
execute: async (interaction: CommandInteraction) => {
|
||||||
// Destructure
|
// Destructure
|
||||||
const { options, user, guild } = interaction;
|
const { options, user, guild } = interaction;
|
||||||
|
|
||||||
|
@ -46,8 +48,8 @@ export default {
|
||||||
`We can not find ${optionUser || "you"} in our database!`
|
`We can not find ${optionUser || "you"} in our database!`
|
||||||
)
|
)
|
||||||
.setTimestamp(new Date())
|
.setTimestamp(new Date())
|
||||||
.setColor(colors?.error as ColorResolvable)
|
.setColor(errorColor)
|
||||||
.setFooter({ text: footer?.text, iconURL: footer?.icon }),
|
.setFooter({ text: footerText, iconURL: footerIcon }),
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -64,8 +66,8 @@ export default {
|
||||||
} in our database!`
|
} in our database!`
|
||||||
)
|
)
|
||||||
.setTimestamp(new Date())
|
.setTimestamp(new Date())
|
||||||
.setColor(colors?.error as ColorResolvable)
|
.setColor(errorColor)
|
||||||
.setFooter({ text: footer?.text, iconURL: footer?.icon }),
|
.setFooter({ text: footerText, iconURL: footerIcon }),
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -81,8 +83,8 @@ export default {
|
||||||
)}.`
|
)}.`
|
||||||
)
|
)
|
||||||
.setTimestamp(new Date())
|
.setTimestamp(new Date())
|
||||||
.setColor(colors?.success as ColorResolvable)
|
.setColor(successColor)
|
||||||
.setFooter({ text: footer?.text, iconURL: footer?.icon }),
|
.setFooter({ text: footerText, iconURL: footerIcon }),
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue