Ask coding questions

← Back to all posts
Welcome Message Sends More Than Once

Hi there. I am making a discord.js bot, and I have added a welcome message to it. Every time I use the message, it sends one more welcome than the last time, so it ends up sending around 10 of the same messages. How do I fix this?


client.on("guildMemberAdd", (member) => {
let guild = member.guild; 
let memberTag = member.user.tag;
let guildname = 
	guild.systemChannel.send("Welcome, " + memberTag+ " to " + guildname+ "!");
PattanAhmed (1397)

@JollyJack8 Hi,
If you thought it is a bug then feel free to post your detailed issue with pics(If you need) here, So that they can understand your issue and follow up with you there.

Hope it helps
Please mark my answer if this helps.

Coder100 (16898)

Hi! Try refreshing your token (getting a new token)


it still does it @Coder100

Coder100 (16898)

ah, well that's not good! I will now diagnose it with 'bug'. Report it @JollyJack8 I've actually seen this before, but usually refreshing the token did it so idk sorry


Alright @Coder100

HackermonDev (2007)

@JollyJack8 you should probably report it to discord.js not since they didn't make the discord.js libary

Coder100 (16898)

no no, it's thats causing it to run twice
discord.js works fine @PDanielY