diff --git a/commands/bank.js b/commands/bank.js index e7335b5..ca51c81 100644 --- a/commands/bank.js +++ b/commands/bank.js @@ -3,8 +3,8 @@ const { MessageEmbed } = require('discord.js'); module.exports = { name: "bank", debug: false, - description: "manage your banking", - usage: "[cmd] [amount]", + description: "Manage your banking", + usage: "[cmd] [opt]", permissions: { channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"], member: [], @@ -13,12 +13,12 @@ module.exports = { options: [ { name: "deposit", - description: "deposit cash into your bank", + description: "Deposit cash into your bank", value: "deposit", type: 1, options: [{ name: "amount", - description: "amount to deposit", + description: "Amount to deposit", value: "amount", type: 10, min_value: 0.01, @@ -27,12 +27,12 @@ module.exports = { }, { name: "withdraw", - description: "withdraw cash from you bank", + description: "Withdraw cash from you bank", value: "deposit", type: 1, options: [{ name: "amount", - description: "amount to withdraw", + description: "Amount to withdraw", value: "amount", type: 10, min_value: 0.01, @@ -41,12 +41,12 @@ module.exports = { }, { name: "balance", - description: "view your bank balance and count your cash", + description: "View your bank balance and count your cash", value: "balance", type: 1, options: [{ name: "user", - description: "user to view ballance", + description: "User to view ballance", value: "user", type: 6, required: false, @@ -54,20 +54,20 @@ module.exports = { }, { name: "give", - description: "give a user cash", + description: "Give a user cash", value: "give", type: 1, options: [ { name: "user", - description: "user to give cash to", + description: "User to give cash to", value: "user", type: 6, required: true, }, { name: "amount", - description: "the amount to give", + description: "The amount to give", value: 1, type: 10, required: true, @@ -76,20 +76,20 @@ module.exports = { }, { name: "transfer", - description: "transfer directly to users bank", + description: "Transfer directly to users bank", value: "transfer", type: 1, options: [ { name: "user", - description: "user to transfer to", + description: "User to transfer to", value: "user", type: 6, required: true, }, { name: "amount", - description: "the amount to transfer", + description: "The amount to transfer", value: 1, type: 10, required: true, diff --git a/commands/help.js b/commands/help.js index ab5bf8c..d54d5be 100644 --- a/commands/help.js +++ b/commands/help.js @@ -13,7 +13,7 @@ module.exports = { options: [ { name: "commands", - description: "list all commands", + description: "List all commands", value: "commands", type: 1, options: [{ @@ -26,13 +26,13 @@ module.exports = { }, { name: "settings", - description: "how to configure the settings", + description: "How to configure the settings", value: "settings", type: 1, }, { name: "support", - description: "get support for QuarksBot", + description: "Get support for QuarksBot", value: "support", type: 1, }, @@ -88,14 +88,29 @@ module.exports = { `\`/${cmd.name}\`${cmd.usage ? " " + cmd.usage : ""}`, true ) - .addField( - "Permissions", - "Member: " + - cmd.permissions.member.join(", ") + - "\nBot: " + - cmd.permissions.channel.join(", "), - true - ); + + for (let i = 0; i < cmd.SlashCommand.options.length; i++) { + if (cmd.SlashCommand.options[i].type == 1) { + let param = cmd.SlashCommand.options[i].options.length > 0 ? ' ' : ''; + for (let j = 0; j < cmd.SlashCommand.options[i].options.length; j++) { + if (cmd.SlashCommand.options[i].options[j].required) param += `[${cmd.SlashCommand.options[i].options[j].name}] ` + } + embed.addField( + `/${cmd.name} ${cmd.SlashCommand.options[i].name}${param}`, + `${cmd.SlashCommand.options[i].description}`, + true + ) + } + } + + embed.addField( + "Permissions", + "Member: " + + cmd.permissions.member.join(", ") + + "\nBot: " + + cmd.permissions.channel.join(", "), + true + ); return interaction.send(embed); } diff --git a/commands/id-set.js b/commands/id-set.js index 4526358..2ff433c 100644 --- a/commands/id-set.js +++ b/commands/id-set.js @@ -3,7 +3,7 @@ const { MessageEmbed } = require('discord.js'); module.exports = { name: "id-set", debug: false, - description: "set a value on your wallet ID", + description: "Set a value on your wallet ID", usage: "[firstname/lastname/dob] [value]", permissions: { channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"], @@ -13,7 +13,7 @@ module.exports = { options: [ { name: "change", - description: "what you'd like to change on your ID", + description: "What you'd like to change on your ID", value: "change", type: 3, required: true, @@ -23,7 +23,7 @@ module.exports = { }, { name: "value", - description: "new value of what you'd like to change", + description: "New value of what you'd like to change", value: "value", type: 3, required: true, diff --git a/commands/inventory-add.js b/commands/inventory-add.js index ec1b731..017de67 100644 --- a/commands/inventory-add.js +++ b/commands/inventory-add.js @@ -5,7 +5,7 @@ const action = ['pick up', 'grab', 'get', 'aquire', 'obtain', 'gain', 'take poss module.exports = { name: "inventory-add", debug: false, - description: "add item to inventory", + description: "Add item to inventory", usage: "[item]", permissions: { channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"], @@ -15,13 +15,13 @@ module.exports = { options: [ { name: "firearm", - description: "add firearm to inventory", + description: "Add firearm to inventory", value: "firearm", type: 1, options: [ { name: "type", - description: "type of firearm", + description: "Type of firearm", value: "type", type: 3, required: true, @@ -33,7 +33,7 @@ module.exports = { }, { name: "serialnumber", - description: "firearm serial number", + description: "Firearm serial number", value: "serialnumber", type: 3, required: true, @@ -47,7 +47,7 @@ module.exports = { }, { name: "description", - description: "firearm description", + description: "Firearm description", value: "description", type: 3, required: true, @@ -56,20 +56,20 @@ module.exports = { }, { name: "generic", - description: "add a generic item to inventory", + description: "Add a generic item to inventory", value: "generic", type: 1, options: [ { name: "name", - description: "item name", + description: "Item name", value: "name", type: 3, required: true, }, { name: "description", - description: "item description", + description: "Item description", value: "description", type: 3, required: true, diff --git a/commands/inventory.js b/commands/inventory.js index e6a1c6d..78a1aff 100644 --- a/commands/inventory.js +++ b/commands/inventory.js @@ -28,13 +28,13 @@ module.exports = { }, { name: "item", - description: "view an item in your inventory", + description: "View an item in your inventory", value: "item", type: 1, options: [ { name: "item-number", - description: "item to interact with", + description: "Item to interact with", value: 1, type: 4, required: true, @@ -43,20 +43,20 @@ module.exports = { }, { name: "give", - description: "give user item from inventory", + description: "Give user item from inventory", value: "give", type: 1, options: [ { name: "item-number", - description: "item to interact with", + description: "Item to interact with", value: 1, type: 4, required: true, }, { name: "user", - description: "user to give item", + description: "User to give item", value: "user", type: 6, required: true, @@ -65,13 +65,13 @@ module.exports = { }, { name: "drop", - description: "drop item from inventory", + description: "Drop item from inventory", value: "drop", type: 1, options: [ { name: "item-number", - description: "item to interact with", + description: "Item to interact with", value: 1, type: 4, required: true, @@ -80,7 +80,7 @@ module.exports = { }, { name: "clear", - description: "clear your inventory", + description: "Clear your inventory", value: "clear", type: 1, } diff --git a/commands/money.js b/commands/money.js index 22b1751..3da113d 100644 --- a/commands/money.js +++ b/commands/money.js @@ -13,20 +13,20 @@ module.exports = { options: [ { name: "add", - description: "add money to user", + description: "Add money to user", value: "add", type: 1, options: [ { name: "user", - description: "user to give money", + description: "User to give money", value: "user", type: 6, required: true, }, { name: "amount", - description: "the amount to add to balance", + description: "The amount to add to balance", value: 1000.00, type: 10, required: true, @@ -35,20 +35,20 @@ module.exports = { }, { name: "remove", - description: "remove money from user", + description: "Remove money from user", value: "remove", type: 1, options: [ { name: "user", - description: "user to give money", + description: "User to remove money from", value: "user", type: 6, required: true, }, { name: "amount", - description: "the amount to add to balance", + description: "The amount to add to balance", value: 1000.00, type: 10, required: true, diff --git a/commands/search.js b/commands/search.js index 3faa5f2..026ab1d 100644 --- a/commands/search.js +++ b/commands/search.js @@ -14,14 +14,14 @@ module.exports = { options: [ { name: "user", - description: "user to give item", + description: "User to search", value: "user", type: 6, required: true, }, { name: "item-number", - description: "item to view", + description: "Item to view", value: 1, type: 4, required: false, diff --git a/commands/settings.js b/commands/settings.js index 2e2ab35..b4ba784 100644 --- a/commands/settings.js +++ b/commands/settings.js @@ -13,13 +13,13 @@ module.exports = { options: [ { name: "allowed_channels", - description: "set channels you're allowed to use the bot in", + description: "Set channels you're allowed to use the bot in", value: "allowed_channels", type: 1, options: [ { name: "add_or_remove", - description: "add/remove channel", + description: "Add/remove channel", value: "add_or_remove", type: 3, required: true, @@ -29,7 +29,7 @@ module.exports = { }, { name: "channel", - description: "the channel to configure", + description: "The channel to configure", value: "channel", type: 7, required: true, @@ -38,13 +38,13 @@ module.exports = { }, { name: "action_channel", - description: "set the channel to be used for /me commands", + description: "Set the channel to be used for /me commands", value: "action_channel", type: 1, options: [ { name: "set_or_remove", - description: "set/remove channel", + description: "Set/remove channel", value: "set_or_remove", type: 3, required: true, @@ -54,7 +54,7 @@ module.exports = { }, { name: "channel", - description: "the channel to configure", + description: "The channel to configure", value: "channel", type: 7, required: true, @@ -63,13 +63,13 @@ module.exports = { }, { name: "tweet_channel", - description: "set the channel to be used for /tweet commands", + description: "Set the channel to be used for /tweet commands", value: "tweet_channel", type: 1, options: [ { name: "set_or_remove", - description: "set/remove channel", + description: "Set/remove channel", value: "set_or_remove", type: 3, required: true, @@ -79,7 +79,7 @@ module.exports = { }, { name: "channel", - description: "the channel to configure", + description: "The channel to configure", value: "channel", type: 7, required: true, @@ -88,12 +88,12 @@ module.exports = { }, { name: "starting_balance", - description: "set the starting balance", + description: "Set the starting balance", value: "starting_balance", type: 1, options: [{ name: "amount", - description: "the amount to set the starting balance", + description: "The amount to set the starting balance", value: 1000.00, type: 10, required: true, @@ -101,20 +101,20 @@ module.exports = { }, { name: "set_income_role", - description: "add/update a role to earn income on /work command", + description: "Add/update a role to earn income on /work command", value: "set_income_role", type: 1, options: [ { name: "role", - description: "role for this income", + description: "Role for this income", value: "role", type: 8, required: true, }, { name: "amount", - description: "the amount to earn in 1 day of work", + description: "The amount to earn in 1 day of work", value: 120.00, type: 10, required: true, @@ -123,13 +123,13 @@ module.exports = { }, { name: "remove_income_role", - description: "remove a role from earning income", + description: "Remove a role from earning income", value: "remove_income_role", type: 1, options: [ { name: "role", - description: "role to remove", + description: "Role to remove", value: "role", type: 8, required: true, @@ -138,7 +138,7 @@ module.exports = { }, { name: "view", - description: "view current settings configuration", + description: "View current settings configuration", value: "view", type: 1, }