From 37620144d8687cfc927c8664182a9fbf341f2f1a Mon Sep 17 00:00:00 2001 From: tkaixiang28 Date: Fri, 19 Jul 2024 15:10:28 +0800 Subject: [PATCH] update version --- Commands/sphelp.ts | 425 ++++++++++++++++++++++++--------------------- constants.ts | 2 + index.ts | 35 ++-- 3 files changed, 245 insertions(+), 217 deletions(-) create mode 100644 constants.ts diff --git a/Commands/sphelp.ts b/Commands/sphelp.ts index 51b59a7..07c9a75 100644 --- a/Commands/sphelp.ts +++ b/Commands/sphelp.ts @@ -1,217 +1,242 @@ -import { ChatInputCommandInteraction} from "discord.js"; +import { ChatInputCommandInteraction } from "discord.js"; +import { UPDATE_DATA, UPDATE_DATE, VERSION } from "../constants"; -const sphelp = async (interaction: ChatInputCommandInteraction): Promise => { - +const sphelp = async ( + interaction: ChatInputCommandInteraction, +): Promise => { + const helpEmbed: { fields: Array; [key: string]: any } = { + title: "Storeman Bot Command Help", + fields: [], + }; - const helpEmbed: {fields: Array, [key: string]: any} = { - title: "Storeman Bot Command Help", - fields: [], - } - - let embedList = [] + let embedList = []; - const commandList = [ - { - name: "/sphelp", - value: "Displays this message." - }, - { - name: "/spstatus πŸ™β€β™‚οΈ", - value: 'Displays the current full stockpile status if no options are specified. \n\nSpecify a `` to show only details for that stockpile, **do not** specify `` if this option is specified.\n\n `` can be "Targets" to display only targets or "Group Targets" to display stockpile group targets.\n\n Specify a `` to show that stockpile group target only.' - }, - { - name: "/spsetamount πŸ™β€β™‚οΈ", - value: "Sets the \`\` that an \`\` has in **__crates__** inside the \`\`. (E.g \`/spsetamount set Basic Materials Crate 100\`)" - }, - { - name: "/spfind πŸ™β€β™‚οΈ", - value: "Searches through all the stockpiles for the specified and returns which stockpile has the item." - }, - { - name: "/sprefresh πŸ™β€β™‚οΈ", - value: "Refreshes the timer of **ALL stockpiles** if **no name is specified**, or the timer of \`\`" - }, - { - name: "/sptarget set πŸ‘¨β€βš–οΈ", - value: "Sets the target \`\` that an \`\` should have in **__crates__**. (E.g \`/sptarget set Basic Materials Crate 100\`)" - }, - { - name: "/sptarget remove πŸ‘¨β€βš–οΈ", - value: "Removes a target item off the stockpile." - }, - { - name: "/spstockpile add πŸ‘¨β€βš–οΈ", - value: "Adds an EMPTY stockpile with the name ." - }, - { - name: "/spstockpile remove πŸ‘¨β€βš–οΈ", - value: "Removes the from the stockpile status and listings." - }, - { - name: "/spstockpile purge πŸ‘¨β€βš–οΈ", - value: "Purges all stockpiles and their related information such as pretty names and order settings." - }, - { - name: "/spsetpassword πŸ‘¨β€βš–οΈ", - value: "Sets the password used to update information to the HTTP endpoint from the Stockpiler app." - }, - { - name: "/splogichannel set πŸ‘¨β€βš–οΈ", - value: "Sets a logi channel in which stockpile information would always be displayed and updated on." - }, - { - name: "/splogichannel remove πŸ‘¨β€βš–οΈ", - value: "Removes a logi channel in which stockpile information would always be displayed and updated on." - }, - { - name: "/sprole add πŸ‘¨β€βš–οΈ", - value: 'Add a role which will be allowed to have . can be either "Admin" or "User".' - }, - { - name: "/sprole remove πŸ‘¨β€βš–οΈ", - value: "Removes a role from whatever permissions they have." - }, - { - name: "/spuser add πŸ‘¨β€βš–οΈ", - value: 'Add a user which will be allowed to have . can be either "Admin" or "User".' - }, - { - name: "/spuser remove πŸ‘¨β€βš–οΈ", - value: "Removes a user from whatever permissions they have." - }, - { - name: "/spsetorder πŸ‘¨β€βš–οΈ", - value: "Sets the of a in the logi channel message." - }, - { - name: "/spsettimeleft