-
Notifications
You must be signed in to change notification settings - Fork 3
/
welcome.js
33 lines (26 loc) · 1.54 KB
/
welcome.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
26
27
28
29
30
31
32
33
const { ReactionCollector } = require("discord.js");
module.exports = client => {
const channelId = "759670370558541845";
client.on("guildMemberAdd", (member) => {
console. log(member);
const joinOptions = [`<@${member.id}> has joined among us!`,
`Hey <@${member.id}>! Welcome to the Unswallowed Committee`,
`<@${member.id}> joined the server?! LETS GO!!!`,
`<@${member.id}> joined the server! Salamat, Thanks!`];
const message = joinOptions[Math.floor(Math.random() * joinOptions.length)];
const channel = member.guild.channels.cache.get(channelId);
channel.send(message).then(sentMessage => {
sentMessage.react(client.emojis.cache.find(emoji => emoji.name === "peepoUpvote"))});
});
client.on("guildMemberRemove", (member) => {
console. log(member);
const leaveOptions = [`<@${member.id}> fell down a hole`,
`<@${member.id}> went to play with some other friends`,
`All my homies hate <@${member.id}> for leaving the server`,
`<@${member.id}> bites the dust. F`]
const message = leaveOptions[Math.floor(Math.random() * leaveOptions.length)];
const channel = member.guild.channels.cache.get(channelId);
channel.send(message).then(sentMessage => {
sentMessage.react(client.emojis.cache.find(emoji => emoji.name === "downvote"))});
});
};