mekb-turtle/discord-ai-bot

error on npm start: new Error("Used disallowed intents")

Closed this issue · 0 comments

Followed setup instructions here
Ran npm i then npm start
Got error:

[Shard Manager] [INFO] Loading
[Shard #0] [INFO] Created shard
/Users/[user]/Documents/Mozilla/AI/localai/ollama/discord bot/discord-ai-bot/node_modules/@discordjs/ws/dist/index.js:1132
          error: new Error("Used disallowed intents")
                 ^

Error: Used disallowed intents
    at WebSocketShard.onClose (/Users/[user]/Documents/Mozilla/AI/localai/ollama/discord bot/discord-ai-bot/node_modules/@discordjs/ws/dist/index.js:1132:18)
    at connection.onclose (/Users/[user]/Documents/Mozilla/AI/localai/ollama/discord bot/discord-ai-bot/node_modules/@discordjs/ws/dist/index.js:676:17)
    at callListener (/Users/[user]/Documents/Mozilla/AI/localai/ollama/discord bot/discord-ai-bot/node_modules/ws/lib/event-target.js:290:14)
    at WebSocket.onClose (/Users/[user]/Documents/Mozilla/AI/localai/ollama/discord bot/discord-ai-bot/node_modules/ws/lib/event-target.js:220:9)
    at WebSocket.emit (node:events:514:28)
    at WebSocket.emitClose (/Users/[user]/Documents/Mozilla/AI/localai/ollama/discord bot/discord-ai-bot/node_modules/ws/lib/websocket.js:260:10)
    at TLSSocket.socketOnClose (/Users/[user]/Documents/Mozilla/AI/localai/ollama/discord bot/discord-ai-bot/node_modules/ws/lib/websocket.js:1272:15)
    at TLSSocket.emit (node:events:526:35)
    at node:net:337:12
    at TCP.done (node:_tls_wrap:657:7)

Node.js v20.9.0
/Users/[user]/Documents/Mozilla/AI/localai/ollama/discord bot/discord-ai-bot/node_modules/discord.js/src/sharding/Shard.js:178
        reject(new DiscordjsError(ErrorCodes.ShardingReadyDied, this.id));
               ^

Error [ShardingReadyDied]: Shard 0's process exited before its Client became ready.
    at Shard.onDeath (/Users/[user]/Documents/Mozilla/AI/localai/ollama/discord bot/discord-ai-bot/node_modules/discord.js/src/sharding/Shard.js:178:16)
    at Object.onceWrapper (node:events:629:26)
    at Shard.emit (node:events:514:28)
    at Shard._handleExit (/Users/[user]/Documents/Mozilla/AI/localai/ollama/discord bot/discord-ai-bot/node_modules/discord.js/src/sharding/Shard.js:439:10)
    at ChildProcess.emit (node:events:514:28)
    at ChildProcess._handle.onexit (node:internal/child_process:294:12) {
  code: 'ShardingReadyDied'
}

Node.js v20.9.0

ollama/discord bot/discord-ai-bot via  v20.9.0 on ☁️  [user]@gmail.com 
❯ node:events:492
      throw er; // Unhandled 'error' event
      ^

Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed
    at new NodeError (node:internal/errors:406:5)
    at target.send (node:internal/child_process:754:16)
    at Client.<anonymous> (/Users/[user]/Documents/Mozilla/AI/localai/ollama/discord bot/discord-ai-bot/node_modules/discord.js/src/sharding/ShardClientUtil.js:43:19)
    at Client.emit (node:events:514:28)
    at WebSocketManager.<anonymous> (/Users/[user]/Documents/Mozilla/AI/localai/ollama/discord bot/discord-ai-bot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:271:19)
    at WebSocketManager.emit (/Users/[user]/Documents/Mozilla/AI/localai/ollama/discord bot/discord-ai-bot/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:282:31)
    at WebSocketShard.<anonymous> (/Users/[user]/Documents/Mozilla/AI/localai/ollama/discord bot/discord-ai-bot/node_modules/@discordjs/ws/dist/index.js:1173:51)
    at WebSocketShard.emit (/Users/[user]/Documents/Mozilla/AI/localai/ollama/discord bot/discord-ai-bot/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:290:37)
    at WebSocketShard.onClose (/Users/[user]/Documents/Mozilla/AI/localai/ollama/discord bot/discord-ai-bot/node_modules/@discordjs/ws/dist/index.js:1056:10)
    at connection.onclose (/Users/[user]/Documents/Mozilla/AI/localai/ollama/discord bot/discord-ai-bot/node_modules/@discordjs/ws/dist/index.js:676:17)
Emitted 'error' event on process instance at:
    at node:internal/child_process:758:35
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11) {
  code: 'ERR_IPC_CHANNEL_CLOSED'
}