Prefix not detected

Hello again! I try to add prefix but when i use !help nothin appear. I think this comes from my config:
export default class DiscordClient extends Client {
/**
* Registry of the client.
*/
readonly registry: Registry;

/**
* Config of the client.
*/
readonly config: IConfig;

constructor(intents: GatewayIntentBits[]) {
super({ intents });

/**
* Setting up client's config.
*/
this.config = {
token: process.env.TOKEN as string,
prefix: '!', // process.env.PREFIX as string
developers: JSON.parse(process.env.DEVELOPERS as string) as string[],
unknownErrorMessage: JSON.parse(
process.env.UNKNOWN_COMMAND_ERROR as string
)
};

/**
* Creating new registry class.
*/
this.registry = new Registry(this);

/**
* Registering events and commands.
*/
this.registry.registerAll();
}
}
export default class DiscordClient extends Client {
/**
* Registry of the client.
*/
readonly registry: Registry;

/**
* Config of the client.
*/
readonly config: IConfig;

constructor(intents: GatewayIntentBits[]) {
super({ intents });

/**
* Setting up client's config.
*/
this.config = {
token: process.env.TOKEN as string,
prefix: '!', // process.env.PREFIX as string
developers: JSON.parse(process.env.DEVELOPERS as string) as string[],
unknownErrorMessage: JSON.parse(
process.env.UNKNOWN_COMMAND_ERROR as string
)
};

/**
* Creating new registry class.
*/
this.registry = new Registry(this);

/**
* Registering events and commands.
*/
this.registry.registerAll();
}
}
Could you help me again lol ?
2 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs3y ago
If you aren't getting content, embeds or attachments of a message, make sure you have the MessageContent intent enabled in the Developer Portal and provide it to your client:
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent]
});
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent]
});
Want results from more Discord servers?
Add your server