[CodeFactor] Apply fixes to commit 2e12fe3
This commit is contained in:
parent
91b25452e8
commit
883cd59497
3 changed files with 12 additions and 11 deletions
|
@ -6,9 +6,7 @@ module.exports = async (interaction) => {
|
|||
await credits.find().then(async (data) => {
|
||||
const topTen = data.sort((a, b) => (a.balance > b.balance ? -1 : 1)).slice(0, 10);
|
||||
|
||||
const item = (x, index) => {
|
||||
return `**Top ${index + 1}** - <@${x.userId}> ${creditNoun(x.balance)}`;
|
||||
};
|
||||
const item = (x, index) => `**Top ${index + 1}** - <@${x.userId}> ${creditNoun(x.balance)}`;
|
||||
|
||||
const embed = {
|
||||
title: 'Balance Top',
|
||||
|
|
|
@ -79,15 +79,20 @@ module.exports = {
|
|||
async execute(interaction) {
|
||||
if (interaction.options.getSubcommand() === 'balance') {
|
||||
await balance(interaction);
|
||||
} else if (interaction.options.getSubcommand() === 'gift') {
|
||||
}
|
||||
else if (interaction.options.getSubcommand() === 'gift') {
|
||||
await gift(interaction);
|
||||
} else if (interaction.options.getSubcommand() === 'give') {
|
||||
}
|
||||
else if (interaction.options.getSubcommand() === 'give') {
|
||||
await give(interaction);
|
||||
} else if (interaction.options.getSubcommand() === 'redeem') {
|
||||
}
|
||||
else if (interaction.options.getSubcommand() === 'redeem') {
|
||||
await redeem(interaction);
|
||||
} else if (interaction.options.getSubcommand() === 'take') {
|
||||
}
|
||||
else if (interaction.options.getSubcommand() === 'take') {
|
||||
await take(interaction);
|
||||
} else if (interaction.options.getSubcommand() === 'top') {
|
||||
}
|
||||
else if (interaction.options.getSubcommand() === 'top') {
|
||||
await top(interaction);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
module.exports = (amount) => {
|
||||
return `${amount <= 1 ? `${amount} credit` : `${amount} credits`}`;
|
||||
};
|
||||
module.exports = (amount) => `${amount <= 1 ? `${amount} credit` : `${amount} credits`}`;
|
||||
|
|
Loading…
Add table
Reference in a new issue