forked from haileylgbt/PieBotCode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshard.js
25 lines (24 loc) · 1.03 KB
/
shard.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const Discord = require('discord.js');
const client = new Discord.Client();
const Manager = new Discord.ShardingManager('app.js');
Manager.spawn(4);
Manager.on('launch', shard => console.log(`Shard ${shard.id} is alive!`));
client.on('guildMemberAdd', member => {
if (member.guild.id =='362186163076988928') {
const embed = new Discord.RichEmbed()
.setTitle('Welcome to GamerLounge!')
.setDescription(`:wave: Welcome ${member.user.username}!\nCheck out <#362186679483760640> before chatting!\nThanks!`)
.setColor(0xFFB200)
client.channels.find('id', '362186163076988930').send({embed});
} else {
if (member.guild.id =='319312258461335553') {
const embed = new Discord.RichEmbed()
.setTitle("Welcome to PieBot's Oven!")
.setDescription(`:wave: Hello ${member.user.username}!\nI've seen that you have joined the server!\nRead <#350871537424924672> and then do **p.enlist** here!\nThanks!`)
.setColor(0xFFB200)
client.channels.find('id', '346208316923445249').send({embed});
} else {
return;
}
}
});