Skip to content

ClientReady is called without user and application #11180

@vakiliner

Description

@vakiliner

Which package is this bug report for?

discord.js

Issue description

An error occurs at startup:
TypeError: Cannot read properties of null (reading 'displayName')

The most important part: bot should not be on any server

Code sample

const { Client, Events } = require('discord.js')
const { token } = require('./config.json')

const client = new Client({
	intents: []
})

client.once(Events.ClientReady, (client) => console.log(`${client.user.displayName} is ready!`))

client.login(token)

Versions

discord.js - 15.0.0-dev.1760486511-25b22c67a
node.js - v23.10.0

Issue priority

Medium (should be fixed soon)

Which partials do you have configured?

No Partials

Which gateway intents are you subscribing to?

No Intents

I have tested this issue on a development release

25b22c6

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions