#message event

1 messages · Page 1 of 1 (latest)

cloud escarp
#

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)

shrewd frigate
#

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
cloud escarp
#

which d.js version are you on? npm ls discord.js

shrewd frigate
#

13.6.0

shrewd frigate
cloud escarp
#

can you show your client constructor?

shrewd frigate
#
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

cloud escarp
#

and the options you pass?

shrewd frigate
#
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

cloud escarp
#

do you have multiple clients?

shrewd frigate
#
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`
    }
});
shrewd frigate
#

wait, have the message intents been enforced yet?

cloud escarp
#

no, and you would still receive the events, content would just be null

shrewd frigate
#

i see

#

i should probably turn these on anyways though rivenJoylmao

shrewd frigate
cloud escarp
#

afaik yes, it's called "message content intent" for a reason