Discord.js: Make bot @mention user on user's first time joining

Created on 1 Sep 2016  路  2Comments  路  Source: discordjs/discord.js

How would I make a bot do something (like send a message) when a user first joins the a discord server?
I've been looking all over for a hint as to how to do that...

question (please use Discord instead)

Most helpful comment

c.on('serverNewMember',(x,y)=>{
    if(x === c.servers.get('id',"SERVERID"))
        c.sendMessage(x.channels.get('name','general'),"Welcome to my Server "+y.mention()+"!")
})

All 2 comments

c.on('serverNewMember',(x,y)=>{
    if(x === c.servers.get('id',"SERVERID"))
        c.sendMessage(x.channels.get('name','general'),"Welcome to my Server "+y.mention()+"!")
})
Was this page helpful?
0 / 5 - 0 ratings

Related issues

BrandonCookeDev picture BrandonCookeDev  路  3Comments

xCuzImPro picture xCuzImPro  路  3Comments

Dmitry221060 picture Dmitry221060  路  3Comments

LLamaFTL picture LLamaFTL  路  3Comments

DatMayo picture DatMayo  路  3Comments