#message event
1 messages · Page 1 of 1 (latest)
do the other events work fine? Are you sure there's no permission overwrite for the channel you are sending messages in?
I don't see any issue with your code
Do DMs work? (you need the channel partial for them)
ready.ts:
module.exports = client => {
try{
client.user.setStatus(`online`);
client.user.setActivity({
name: `Zlushiie#8060`,
type: `WATCHING`
});
} catch (e){
console.log(e.stack);
}
}
```bot's activity is `Watching Zlushiie#8060` so i believe it's functional
which d.js version are you on? npm ls discord.js
13.6.0
DMs dont work either, with intents for them
can you show your client constructor?
class Client extends Discord.Client {
public commands: Discord.Collection<String, Command>;
public censors: Discord.Collection<String, Censor>;
constructor(options: Discord.ClientOptions) {
super(options);
this.commands = new Discord.Collection();
this.censors = new Discord.Collection();
}
}
just to add some collections
and the options you pass?
const client = new t.Client({
allowedMentions: {
repliedUser: false,
},
partials: [],
intents: [
t.Discord.Intents.FLAGS.GUILDS,
//Discord.Intents.FLAGS.GUILD_MEMBERS,
//Discord.Intents.FLAGS.GUILD_BANS,
//Discord.Intents.FLAGS.GUILD_EMOJIS_AND_STICKERS,
//Discord.Intents.FLAGS.GUILD_INTEGRATIONS,
//Discord.Intents.FLAGS.GUILD_WEBHOOKS,
//Discord.Intents.FLAGS.GUILD_INVITES,
//Discord.Intents.FLAGS.GUILD_VOICE_STATES,
//Discord.Intents.FLAGS.GUILD_PRESENCES,
//Discord.Intents.FLAGS.GUILD_MESSAGES,
//Discord.Intents.FLAGS.GUILD_MESSAGE_REACTIONS,
//Discord.Intents.FLAGS.GUILD_MESSAGE_TYPING,
//Discord.Intents.FLAGS.DIRECT_MESSAGES,
//Discord.Intents.FLAGS.DIRECT_MESSAGE_REACTIONS,
//Discord.Intents.FLAGS.DIRECT_MESSAGE_TYPING
],
presence: {
status: `dnd`
}
});
wait
wrong file
do you have multiple clients?
const client = new t.Client({
allowedMentions: {
repliedUser: false,
},
partials: [],
intents: [
t.Discord.Intents.FLAGS.GUILDS,
t.Discord.Intents.FLAGS.GUILD_MEMBERS,
//Discord.Intents.FLAGS.GUILD_BANS,
//Discord.Intents.FLAGS.GUILD_EMOJIS_AND_STICKERS,
//Discord.Intents.FLAGS.GUILD_INTEGRATIONS,
//Discord.Intents.FLAGS.GUILD_WEBHOOKS,
//Discord.Intents.FLAGS.GUILD_INVITES,
//Discord.Intents.FLAGS.GUILD_VOICE_STATES,
//Discord.Intents.FLAGS.GUILD_PRESENCES,
t.Discord.Intents.FLAGS.GUILD_MESSAGES,
t.Discord.Intents.FLAGS.GUILD_MESSAGE_REACTIONS,
//Discord.Intents.FLAGS.GUILD_MESSAGE_TYPING,
t.Discord.Intents.FLAGS.DIRECT_MESSAGES,
t.Discord.Intents.FLAGS.DIRECT_MESSAGE_REACTIONS,
//Discord.Intents.FLAGS.DIRECT_MESSAGE_TYPING
],
presence: {
status: `dnd`
}
});
that was from a template i was working on earlier, different from the bot i'm trying to use
wait, have the message intents been enforced yet?
no, and you would still receive the events, content would just be null
after turning them on it works fine, you sure the event still works without message intents?
afaik yes, it's called "message content intent" for a reason
