Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled Rejection at: Promise | Used disallowed intents #587

Closed
EastWestGamer opened this issue Jun 27, 2024 · 1 comment
Closed

Unhandled Rejection at: Promise | Used disallowed intents #587

EastWestGamer opened this issue Jun 27, 2024 · 1 comment

Comments

@EastWestGamer
Copy link

EastWestGamer commented Jun 27, 2024

I get this error when I try to run it using docker compose:

█░░ ▄▀█ █░█ ▄▀█ █▀▄▀█ █░█ █▀ █ █▀▀
█▄▄ █▀█ ▀▄▀ █▀█ █░▀░█ █▄█ ▄█ █ █▄▄
                                
         .:::.=++=:.:-:             
        =##############*            
        *###############.           
         =++=*####*=++=:            
             .*##*:                               
           .+######*:               
          =*#########+.             
        :*############*-            
       =################*.          
     :*##################*=         
   .+######################*:       
   *#########################.      
   .::::::::::::::::::::::::.       

[6/27/2024] [7:07:21 PM] [Lavamusic.js] [Lavamusic] › ℹ info Successfully loaded commands!
[6/27/2024] [7:07:21 PM] [Lavamusic.js] [Lavamusic] › ℹ info Successfully loaded events!
[6/27/2024] [7:07:21 PM] [index.js] [Lavamusic] › ℹ info Loaded plugin: AntiCrash Plugin v1.0.0
[6/27/2024] [7:07:21 PM] [index.js] [Lavamusic] › ℹ info Loaded plugin: KeepAlive Plugin v1.0.0
[6/27/2024] [7:07:21 PM] [index.js] [Lavamusic] › ℹ info Loaded plugin: Update Status Plugin v1.0.0
[6/27/2024] [7:07:22 PM] [antiCrash.js] [Lavamusic] › ✖ error Unhandled Rejection at: Promise {
Error: Used disallowed intents
at WebSocketShard.onClose (/opt/lavamusic/node_modules/@discordjs/ws/dist/index.js:1149:18)
at connection.onclose (/opt/lavamusic/node_modules/@discordjs/ws/dist/index.js:686:17)
at callListener (/opt/lavamusic/node_modules/ws/lib/event-target.js:290:14)
at WebSocket.onClose (/opt/lavamusic/node_modules/ws/lib/event-target.js:220:9)
at WebSocket.emit (node:events:519:28)
at WebSocket.emitClose (/opt/lavamusic/node_modules/ws/lib/websocket.js:265:10)
at TLSSocket.socketOnClose (/opt/lavamusic/node_modules/ws/lib/websocket.js:1289:15)
at TLSSocket.emit (node:events:531:35)
at node:net:337:12
at TCP.done (node:_tls_wrap:657:7)
} reason: Error: Used disallowed intents
at WebSocketShard.onClose (/opt/lavamusic/node_modules/@discordjs/ws/dist/index.js:1149:18)
at connection.onclose (/opt/lavamusic/node_modules/@discordjs/ws/dist/index.js:686:17)
at callListener (/opt/lavamusic/node_modules/ws/lib/event-target.js:290:14)
at WebSocket.onClose (/opt/lavamusic/node_modules/ws/lib/event-target.js:220:9)
at WebSocket.emit (node:events:519:28)
at WebSocket.emitClose (/opt/lavamusic/node_modules/ws/lib/websocket.js:265:10)
at TLSSocket.socketOnClose (/opt/lavamusic/node_modules/ws/lib/websocket.js:1289:15)
at TLSSocket.emit (node:events:531:35)
at node:net:337:12
at TCP.done (node:_tls_wrap:657:7)
[6/27/2024] [7:07:51 PM] [index.js] [Lavamusic] › ✖ error [CLIENT] An error has occurred: Error [ShardingReadyTimeout]: Shard 0's Client took too long to become ready.
at Timeout.onTimeout (/opt/lavamusic/node_modules/discord.js/src/sharding/Shard.js:183:16)
at listOnTimeout (node:internal/timers:573:17)
at process.processTimers (node:internal/timers:514:7) {
code: 'ShardingReadyTimeout'
}

Here is my docker compose file:

version: '3.4'
services:
lavalink:
image: ghcr.io/lavalink-devs/lavalink:4
container_name: lavalink
restart: unless-stopped
environment:
# set Java options here
- _JAVA_OPTIONS=-Xmx2G
# set lavalink server port
- SERVER_PORT=2333
# set password for lavalink
- LAVALINK_SERVER_PASSWORD=youshallnotpass
volumes:
# mount application.yml from the same directory or use environment variables
- /home/opc/MusicBot/Lavalink/application.yml:/opt/Lavalink/application.yml
# persist plugins between restarts, make sure to set the correct permissions (user: 322, group: 322)
- /home/opc/MusicBot/Lavalink/plugins/:/opt/Lavalink/plugins
networks:
- lavalink
expose:
# lavalink exposes port 2333 to connect to for other containers (this is for documentation purposes only)
- 2333
ports:
# you only need this if you want to make your lavalink accessible from outside of containers
- "2333:2333"
musicbot:
image: ghcr.io/appujet/lavamusic:main
container_name: musicbot
#environment:
# Your lavalink url
#- LAVALINK_URL=172.23.0.2:2333
# Your lavalink password
#- LAVALINK_AUTH=youshallnotpass
# Your lavalink name
#- LAVALINK_NAME=OtwockBot
# Your lavalink secure (true or false)
#- LAVALINK_SECURE=false
# database url
# - DATABASE_URL= put your database url here (mongodb or postgres)
# - DATABASE_URL=postgresql://lavamusic:lavamusic@postgres:5432/lavamusic (for postgres)
# - DATABASE_URL=mongodb://mongoadmin:mongopassword@mongodb:27017/lavamusic?authSource=admin (for mongodb)
volumes:
# mount .env from the same directory or use environment variables
- /home/opc/MusicBot/.env:/opt/lavamusic/.env
#- .env:/opt/lavamusic/.env
restart: unless-stopped
networks:
- lavalink
depends_on:
- lavalink
networks:
#create a lavalink network you can add other containers to, to give them access to Lavalink
lavalink:
name: lavalink

@EastWestGamer
Copy link
Author

Need to go into developer settings on discord and enable intents.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant