diff --git a/src/commands/credits/addons/settings.js b/src/commands/credits/addons/settings.js index 52981f3..561e285 100644 --- a/src/commands/credits/addons/settings.js +++ b/src/commands/credits/addons/settings.js @@ -26,8 +26,7 @@ module.exports = async (interaction) => { // eslint-disable-next-line max-len guild.credits.workTimeout = workTimeout !== null ? workTimeout : guild.credits.workTimeout; // eslint-disable-next-line max-len - guild.credits.minimumLength = - minimumLength !== null ? minimumLength : guild.credits.minimumLength; + guild.credits.minimumLength = minimumLength !== null ? minimumLength : guild.credits.minimumLength; await guild.save(); const embed = { diff --git a/src/commands/credits/index.js b/src/commands/credits/index.js index 469cc88..d9a2308 100644 --- a/src/commands/credits/index.js +++ b/src/commands/credits/index.js @@ -25,124 +25,70 @@ module.exports = { data: new SlashCommandBuilder() .setName('credits') .setDescription('Manage your credits.') - .addSubcommand((subcommand) => - subcommand + .addSubcommand((subcommand) => subcommand .setName('give') .setDescription('Give credits to a user. (ADMIN)') - .addUserOption((option) => - option.setName('user').setDescription('The user you want to pay.').setRequired(true) - ) - .addIntegerOption((option) => - option.setName('amount').setDescription('The amount you will pay.').setRequired(true) - ) - ) - .addSubcommand((subcommand) => - subcommand + .addUserOption((option) => option.setName('user').setDescription('The user you want to pay.').setRequired(true)) + .addIntegerOption((option) => option.setName('amount').setDescription('The amount you will pay.').setRequired(true))) + .addSubcommand((subcommand) => subcommand .setName('take') .setDescription('Take credits from a user. (ADMIN)') - .addUserOption((option) => - option + .addUserOption((option) => option .setName('user') .setDescription('The user you want to take credits from.') - .setRequired(true) - ) - .addIntegerOption((option) => - option.setName('amount').setDescription('The amount you will take.').setRequired(true) - ) - ) - .addSubcommand((subcommand) => - subcommand + .setRequired(true)) + .addIntegerOption((option) => option.setName('amount').setDescription('The amount you will take.').setRequired(true))) + .addSubcommand((subcommand) => subcommand .setName('balance') .setDescription("Check a user's balance.") - .addUserOption((option) => - option + .addUserOption((option) => option .setName('user') .setDescription('The user whose balance you want to check.') - .setRequired(false) - ) - ) - .addSubcommand((subcommand) => - subcommand + .setRequired(false))) + .addSubcommand((subcommand) => subcommand .setName('redeem') .setDescription('Redeem your credits.') - .addIntegerOption((option) => - option.setName('amount').setDescription('How much credit you want to withdraw.') - ) - ) - .addSubcommand((subcommand) => - subcommand + .addIntegerOption((option) => option.setName('amount').setDescription('How much credit you want to withdraw.'))) + .addSubcommand((subcommand) => subcommand .setName('gift') .setDescription('Gift someone credits from your credits.') - .addUserOption((option) => - option.setName('user').setDescription('The user you want to pay.').setRequired(true) - ) - .addIntegerOption((option) => - option.setName('amount').setDescription('The amount you will pay.').setRequired(true) - ) - .addStringOption((option) => option.setName('reason').setDescription('Your reason.')) - ) - .addSubcommand((subcommand) => - subcommand.setName('top').setDescription('Check the top balance.') - ) - .addSubcommand((subcommand) => - subcommand + .addUserOption((option) => option.setName('user').setDescription('The user you want to pay.').setRequired(true)) + .addIntegerOption((option) => option.setName('amount').setDescription('The amount you will pay.').setRequired(true)) + .addStringOption((option) => option.setName('reason').setDescription('Your reason.'))) + .addSubcommand((subcommand) => subcommand.setName('top').setDescription('Check the top balance.')) + .addSubcommand((subcommand) => subcommand .setName('transfer') .setDescription('Transfer credits from a user to another user. (ADMIN)') - .addUserOption((option) => - option + .addUserOption((option) => option .setName('from') .setDescription('The user you want to take credits from.') - .setRequired(true) - ) - .addUserOption((option) => - option + .setRequired(true)) + .addUserOption((option) => option .setName('to') .setDescription('The user you want to give credits to.') - .setRequired(true) - ) - .addIntegerOption((option) => - option.setName('amount').setDescription('The amount you will transfer.').setRequired(true) - ) - ) - .addSubcommand((subcommand) => - subcommand + .setRequired(true)) + .addIntegerOption((option) => option.setName('amount').setDescription('The amount you will transfer.').setRequired(true))) + .addSubcommand((subcommand) => subcommand .setName('set') .setDescription('Set credits on a user. (ADMIN)') - .addUserOption((option) => - option + .addUserOption((option) => option .setName('user') .setDescription('The user you want to set credits on.') - .setRequired(true) - ) - .addIntegerOption((option) => - option.setName('amount').setDescription('The amount you will set.').setRequired(true) - ) - ) - .addSubcommand((subcommand) => - subcommand + .setRequired(true)) + .addIntegerOption((option) => option.setName('amount').setDescription('The amount you will set.').setRequired(true))) + .addSubcommand((subcommand) => subcommand .setName('settings') .setDescription('Manage credit settings. (ADMIN)') .addBooleanOption((option) => option.setName('status').setDescription('Toggle credits.')) .addStringOption((option) => option.setName('url').setDescription('Controlpanel.gg URL.')) - .addStringOption((option) => - option.setName('token').setDescription('Controlpanel.gg token.') - ) + .addStringOption((option) => option.setName('token').setDescription('Controlpanel.gg token.')) .addNumberOption((option) => option.setName('rate').setDescription('Credits rate.')) - .addNumberOption((option) => - option.setName('minimum-length').setDescription('Minimum length for credits.') - ) - .addNumberOption((option) => - option.setName('work-rate').setDescription('Work rate (rate).') - ) - .addNumberOption((option) => - option + .addNumberOption((option) => option.setName('minimum-length').setDescription('Minimum length for credits.')) + .addNumberOption((option) => option.setName('work-rate').setDescription('Work rate (rate).')) + .addNumberOption((option) => option .setName('work-timeout') - .setDescription('Timeout between working for credits (milliseconds).') - ) - .addNumberOption((option) => - option.setName('timeout').setDescription('Timeout between credits (milliseconds).') - ) - ) + .setDescription('Timeout between working for credits (milliseconds).')) + .addNumberOption((option) => option.setName('timeout').setDescription('Timeout between credits (milliseconds).'))) .addSubcommand((subcommand) => subcommand.setName('work').setDescription('Work for credits.')), async execute(interaction) { const guild = await guilds.findOne({ guildId: interaction.member.guild.id });