appujet / lavamusic

lavalink music bot base in shoukaku and discord.js v14
https://appujet.github.io/lavamusic/
GNU General Public License v3.0
567 stars 491 forks source link

Error using docker compose #718

Closed edgardoalvarez100 closed 2 days ago

edgardoalvarez100 commented 1 week ago

I've been getting this error for quite some time and the bot doesn't work

Cannot read properties of undefined (reading 'rest')

[6/9/2024] [3:20:48 p. m.] [index.js] [Lavamusic] » ℹ info Loaded plugin: KeepAlive Plugin v1.0.0 [6/9/2024] [3:20:48 p. m.] [index.js] [Lavamusic] » ℹ info Loaded plugin: Update Status Plugin v1.0.0 [6/9/2024] [3:20:48 p. m.] [Ready.js] [Lavamusic] » ✔ success Bot Accolade#9446 is ready! [6/9/2024] [3:20:48 p. m.] [Ready.js] [Lavamusic] » ⚠ warn Top.gg token not found. Skipping auto poster. [6/9/2024] [3:20:48 p. m.] [index.js] [Lavamusic] » ▶ start [CLIENT] Shard 0 connected to Discord's Gateway. [6/9/2024] [3:20:48 p. m.] [index.js] [Lavamusic] » ▶ start [CLIENT] 1 shard(s) spawned. Error during search: TypeError: Cannot read properties of undefined (reading 'rest') at Queue.search (file:///C:/Users/Edgardo/Desktop/lavamusic-git/dist/structures/Queue.js:66:31) at Play.autocomplete (file:///C:/Users/Edgardo/Desktop/lavamusic-git/dist/commands/music/Play.js:151:45) at InteractionCreate.run (file:///C:/Users/Edgardo/Desktop/lavamusic-git/dist/events/client/InteractionCreate.js:205:31) at Lavamusic. (file:///C:/Users/Edgardo/Desktop/lavamusic-git/dist/structures/Lavamusic.js:180:60) at Lavamusic.emit (node:events:531:35) at InteractionCreateAction.handle (C:\Users\Edgardo\Desktop\lavamusic-git\node_modules\discord.js\src\client\actions\InteractionCreate.js:97:12) at module.exports [as INTERACTION_CREATE] (C:\Users\Edgardo\Desktop\lavamusic-git\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36) at WebSocketManager.handlePacket (C:\Users\Edgardo\Desktop\lavamusic-git\node_modules\discord.js\src\client\websocket\WebSocketManager.js:348:31) at WebSocketManager. (C:\Users\Edgardo\Desktop\lavamusic-git\node_modules\discord.js\src\client\websocket\WebSocketManager.js:232:12) at WebSocketManager.emit (C:\Users\Edgardo\Desktop\lavamusic-git\node_modules\@vladfrangu\async_event_emitter\dist\index.cjs:287:31) Error during search: TypeError: Cannot read properties of undefined (reading 'rest') at Queue.search (file:///C:/Users/Edgardo/Desktop/lavamusic-git/dist/structures/Queue.js:66:31) at Play.autocomplete (file:///C:/Users/Edgardo/Desktop/lavamusic-git/dist/commands/music/Play.js:151:45) at InteractionCreate.run (file:///C:/Users/Edgardo/Desktop/lavamusic-git/dist/events/client/InteractionCreate.js:205:31) at Lavamusic. (file:///C:/Users/Edgardo/Desktop/lavamusic-git/dist/structures/Lavamusic.js:180:60) at Lavamusic.emit (node:events:531:35) at InteractionCreateAction.handle (C:\Users\Edgardo\Desktop\lavamusic-git\node_modules\discord.js\src\client\actions\InteractionCreate.js:97:12) at module.exports [as INTERACTION_CREATE] (C:\Users\Edgardo\Desktop\lavamusic-git\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36) at WebSocketManager.handlePacket (C:\Users\Edgardo\Desktop\lavamusic-git\node_modules\discord.js\src\client\websocket\WebSocketManager.js:348:31) at WebSocketManager. (C:\Users\Edgardo\Desktop\lavamusic-git\node_modules\discord.js\src\client\websocket\WebSocketManager.js:232:12) at WebSocketManager.emit (C:\Users\Edgardo\Desktop\lavamusic-git\node_modules\@vladfrangu\async_event_emitter\dist\index.cjs:287:31) Error during search: TypeError: Cannot read properties of undefined (reading 'rest') at Queue.search (file:///C:/Users/Edgardo/Desktop/lavamusic-git/dist/structures/Queue.js:66:31) at Play.autocomplete (file:///C:/Users/Edgardo/Desktop/lavamusic-git/dist/commands/music/Play.js:151:45) at InteractionCreate.run (file:///C:/Users/Edgardo/Desktop/lavamusic-git/dist/events/client/InteractionCreate.js:205:31) at Lavamusic. (file:///C:/Users/Edgardo/Desktop/lavamusic-git/dist/structures/Lavamusic.js:180:60) at Lavamusic.emit (node:events:531:35) at InteractionCreateAction.handle (C:\Users\Edgardo\Desktop\lavamusic-git\node_modules\discord.js\src\client\actions\InteractionCreate.js:97:12) at module.exports [as INTERACTION_CREATE] (C:\Users\Edgardo\Desktop\lavamusic-git\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36) at WebSocketManager.handlePacket (C:\Users\Edgardo\Desktop\lavamusic-git\node_modules\discord.js\src\client\websocket\WebSocketManager.js:348:31) at WebSocketManager. (C:\Users\Edgardo\Desktop\lavamusic-git\node_modules\discord.js\src\client\websocket\WebSocketManager.js:232:12) at WebSocketManager.emit (C:\Users\Edgardo\Desktop\lavamusic-git\node_modules\@vladfrangu\async_event_emitter\dist\index.cjs:287:31) [6/9/2024] [3:21:36 p. m.] [InteractionCreate.js] [Lavamusic] » ✖ error TypeError: Cannot set properties of undefined (setting 'locale') at Object.i18nSetLocale [as setLocale] (C:\Users\Edgardo\Desktop\lavamusic-git\node_modules\i18n\i18n.js:492:25) at T (file:///C:/Users/Edgardo/Desktop/lavamusic-git/dist/structures/I18n.js:28:10) at Context.locale (file:///C:/Users/Edgardo/Desktop/lavamusic-git/dist/structures/Context.js:83:16) at Play.run (file:///C:/Users/Edgardo/Desktop/lavamusic-git/dist/commands/music/Play.js:47:40) at InteractionCreate.run (file:///C:/Users/Edgardo/Desktop/lavamusic-git/dist/events/client/InteractionCreate.js:173:31) [6/9/2024] [3:21:36 p. m.] [antiCrash.js] [Lavamusic] » ✖ error Uncaught Exception thrown: TypeError: Cannot set properties of undefined (setting 'locale') at Object.i18nSetLocale [as setLocale] (C:\Users\Edgardo\Desktop\lavamusic-git\node_modules\i18n\i18n.js:492:25) at T (file:///C:/Users/Edgardo/Desktop/lavamusic-git/dist/structures/I18n.js:28:10) at InteractionCreate.run (file:///C:/Users/Edgardo/Desktop/lavamusic-git/dist/events/client/InteractionCreate.js:196:30)

infnibor commented 1 week ago

Update your code, coppy https://github.com/appujet/lavamusic/issues/677

edgardoalvarez100 commented 1 week ago

Update your code, coppy #677

I have the latest version of the code

infnibor commented 1 week ago

Update your code, coppy #677

I have the latest version of the code

Latest code in branch main, no latest in realese and show me version with package.json

edgardoalvarez100 commented 1 week ago

@infnibor I'm using the latest version of main and this is the package.json

{
  "name": "lavamusic",
  "version": "4.6.7",
  "description": "LavaMusic is a music bot for Discord, written in JavaScript using the Discord.js, Typescript, Shoukaku (Lavalink) library.",
  "main": "dist/index.js",
  "type": "module",
  "scripts": {
    "start": "npm run clean && node .",
    "db:push": "npx prisma db push",
    "db:migrate": "npx prisma migrate dev --name init",
    "build": "tsc --project tsconfig.json",
    "clean": "node scripts/clean.js && npm run build",
    "lint": "biome lint --write",
    "format": "biome format --write"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/appujet/lavamusic.git"
  },
  "keywords": [
    "discord",
    "music",
    "bot",
    "lavalink",
    "shoukaku",
    "lavamusic",
    "typescript",
    "prisma"
  ],
  "author": "appujet",
  "license": "GPL-3.0",
  "bugs": {
    "url": "https://github.com/appujet/lavamusic/issues"
  },
  "homepage": "https://github.com/appujet/lavamusic#readme",
  "devDependencies": {
    "@biomejs/biome": "^1.8.3",
    "@types/i18n": "^0.13.12",
    "@types/node": "^22.5.4",
    "@types/signale": "^1.4.7",
    "prisma": "^5.19.1",
    "typescript": "^5.5.4"
  },
  "dependencies": {
    "@prisma/client": "^5.19.1",
    "@top-gg/sdk": "^3.1.6",
    "discord.js": "^14.16.1",
    "dotenv": "^16.4.5",
    "i18n": "^0.15.1",
    "node-system-stats": "^1.3.0",
    "shoukaku": "github:shipgirlproject/Shoukaku#master",
    "signale": "^1.4.0",
    "topgg-autoposter": "^2.0.2",
    "tslib": "^2.7.0",
    "undici": "^6.19.8"
  },
  "signale": {
    "displayScope": true,
    "displayBadge": true,
    "displayDate": true,
    "displayFilename": true,
    "displayLabel": true,
    "displayTimestamp": true,
    "underlineLabel": true
  }
}
edgardoalvarez100 commented 1 week ago

@appujet The error I see is that perhaps the code in Dockerhub is not updated, can you do a push with the latest changes?

LucasB25 commented 2 days ago

Issues will be fixed in main branch within some time