onJoin - JustCarry/JC-Codes GitHub Wiki
When it works ?
- When member join!
Code Name:
onJoin
Required arguments:
-
(String) channel:
Channel ID
This channel will used for send the message below. -
(String) message:
Content
Greeting message.
Optional arguments:
- (String) role:
Role ID
Add role to member who did join.
Example:
const Discord = require('discord.js');
const jc = require('jc-codes');
const client = new Discord.Client();
jc.setClient( client ) // Put client
jc.add('onJoin', { message: 'Welcome there, [user] have joined to our server, You\'ve invited by [inviter]', channel: 'channel-id', role: 'role-id' } )
jc.exec( ); // Exec codes
client.login('token');