Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

messageCreated event only triggered on first sent message #9679

Closed
penevl opened this issue Jul 2, 2023 · 1 comment
Closed

messageCreated event only triggered on first sent message #9679

penevl opened this issue Jul 2, 2023 · 1 comment

Comments

@penevl
Copy link

penevl commented Jul 2, 2023

Which package is this bug report for?

discord.js

Issue description

So I am trying to create a bot which replies with a certain message for certain trigger words. However I am running in to big problem. The bot only replies to the first message a user sends and just seems to kind of ignore the rest? Example provided here

Code sample

const client = new Client({
  intents: [
    GatewayIntentBits.Guilds,
    GatewayIntentBits.GuildMessages,
    GatewayIntentBits.MessageContent,
  ],
});


client.once("messageCreate", (msg) => {
  console.log(msg.content);
  msg.reply(msg.content);
});

Versions

Issue priority

Low (slightly annoying)

Which partials do you have configured?

No Partials

Which gateway intents are you subscribing to?

Guilds, GuildMessages, MessageContent

I have tested this issue on a development release

1688256778-75d91b5.0

@penevl

This comment was marked as abuse.

@penevl penevl closed this as completed Jul 2, 2023
@Jiralite Jiralite closed this as not planned Won't fix, can't repro, duplicate, stale Jul 2, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants