diff --git a/.eslintrc.js b/.eslintrc.js index fdf3994..38dc1e6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -24,7 +24,7 @@ module.exports = { plugins: ["@typescript-eslint"], rules: { indent: ["error", 4, { SwitchCase: 1 }], - "linebreak-style": ["error", "windows"], + "linebreak-style": ["error", "unix"], quotes: ["warn", "double"], semi: ["error", "never"], "no-unused-vars": "off", diff --git a/nodemon-js.json b/nodemon-js.json index 6cb63a7..f6c3038 100644 --- a/nodemon-js.json +++ b/nodemon-js.json @@ -3,7 +3,6 @@ "ignore": [ ".git", "node_modules/**/node_modules", - "dist/config", "src" ], "verbose": true, diff --git a/nodemon.json b/nodemon.json index d6b0922..107265b 100644 --- a/nodemon.json +++ b/nodemon.json @@ -2,8 +2,7 @@ "restartable": "rs", "ignore": [ ".git", - "node_modules/**/node_modules", - "dist/config" + "node_modules/**/node_modules" ], "verbose": true, "env": { diff --git a/package.json b/package.json index 127d294..f2f72a3 100644 --- a/package.json +++ b/package.json @@ -16,11 +16,11 @@ "dev": "conc --names \"TSC,BOT\" --prefix-colors \"blue, magenta\" \"tsc -w\" \"yarn dev:js\"", "dev:ts": "nodemon --config nodemon.json src/index.ts", "dev:js": "nodemon --config nodemon-js.json dist/index.js", - "dev:build": "ts-node scripts/dev-deploy.ts", + "dev:build": "cross-env NODE_PATH=src/ \"ts-node scripts/dev-deploy.ts\"", "dev:delete": "ts-node scripts/delete-commands.ts", "lint": "eslint src", "lint:fix": "eslint --fix src", - "prod:build": "ts-node scripts/deploy-commands.ts" + "prod:build": "cross-env NODE_PATH=src/ \"ts-node scripts/deploy-commands.ts\"" }, "author": "Taken", "license": "GPL-3.0-only", @@ -35,20 +35,21 @@ "discord.js": "^14.14.1", "dotenv": "^16.4.5", "ioredis": "^5.3.2", - "mongoose": "^8.1.3", + "mongoose": "^8.2.1", "ms": "^2.1.3", "pretty-ms": "^9.0.0", "youtube-ext": "^1.1.16" }, "devDependencies": { "@types/ms": "^0.7.34", - "@types/node": "^20.11.19", - "@typescript-eslint/eslint-plugin": "^7.0.2", - "@typescript-eslint/parser": "^7.0.2", + "@types/node": "^20.11.28", + "@typescript-eslint/eslint-plugin": "^7.2.0", + "@typescript-eslint/parser": "^7.2.0", "concurrently": "^8.2.2", - "eslint": "^8.56.0", + "cross-env": "^7.0.3", + "eslint": "^8.57.0", "ts-node": "^10.9.2", - "typescript": "^5.3.3" + "typescript": "^5.4.2" }, "packageManager": "yarn@4.1.1" } diff --git a/src/commands/instructions.ts b/src/commands/instructions.ts index bac0b62..a847bf9 100644 --- a/src/commands/instructions.ts +++ b/src/commands/instructions.ts @@ -1,6 +1,7 @@ import { SlashCommandBuilder, PermissionFlagsBits } from "discord.js" import { embedColor, devMessage, instructionsgif } from "config/options" import { ICommand } from "interfaces" +import { removeIndents } from "utils/functions/funcs" export = { name: "instructions", @@ -18,12 +19,17 @@ export = { await interaction.reply({ embeds: [{ title: "Verification", - description: "1. Log onto hypixel.\n" + - "2. Right click with the head in your hotbar.\n" + - "3. Click on the social media icon.\n" + - "4. Click on the discord icon.\n" + - "5. Type your username in the chat and press enter.\n" + - "6. Run the `/verify` command in this channel.\n", + description: removeIndents(` + - Log onto hypixel. + - Right click with the head in your hotbar. + - Click on the social media icon. + - Click on the discord icon. + - Type your username in the chat and press enter. + - Run the \`/verify\` command in this channel. + `), + thumbnail: { + url: interaction.guild?.iconURL() || "" + }, color: embedColor, footer: { text: interaction.guild!.name + " | " + devMessage, @@ -31,7 +37,6 @@ export = { }, image: { url: instructionsgif, - proxy_url: instructionsgif } }] }) diff --git a/src/components/autocomplete/music.ts b/src/components/autocomplete/music.ts index e0692a3..a3a975d 100644 --- a/src/components/autocomplete/music.ts +++ b/src/components/autocomplete/music.ts @@ -23,10 +23,10 @@ export = { }) const results = tracks.map(track => ({ - name: `${track.title} [${track.author}]`, + name: `${track.title.slice(0, 20)} [${track.author}]`, value: track.url })) - await interaction.respond(results.slice(0, 10)).catch() + await interaction.respond(results.slice(0, 6)).catch() } } as IAutocomplete \ No newline at end of file diff --git a/src/events/server/ready/status.ts b/src/events/server/ready/status.ts index bfb42f8..9184f2e 100644 --- a/src/events/server/ready/status.ts +++ b/src/events/server/ready/status.ts @@ -27,7 +27,7 @@ export = { setInterval(() => { const status = i++ % statuses.length user.setActivity({ name: getActivity(statuses[status].name), type: statuses[status].type }) - }, 1000 * 60 * 10) + }, 1000 * 60) user.setStatus("dnd") } diff --git a/yarn.lock b/yarn.lock index 237c097..8b891d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -840,7 +840,19 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^7.0.2": +"cross-env@npm:^7.0.3": + version: 7.0.3 + resolution: "cross-env@npm:7.0.3" + dependencies: + cross-spawn: "npm:^7.0.1" + bin: + cross-env: src/bin/cross-env.js + cross-env-shell: src/bin/cross-env-shell.js + checksum: 10c0/f3765c25746c69fcca369655c442c6c886e54ccf3ab8c16847d5ad0e91e2f337d36eedc6599c1227904bf2a228d721e690324446876115bc8e7b32a866735ecf + languageName: node + linkType: hard + +"cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.2": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" dependencies: @@ -1471,6 +1483,7 @@ __metadata: chalk: "npm:^4.1.2" concurrently: "npm:^8.2.2" cron: "npm:^3.1.6" + cross-env: "npm:^7.0.3" discord-player: "npm:^6.6.7" discord.js: "npm:^14.14.1" dotenv: "npm:^16.4.5"