-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
46 lines (40 loc) · 1.25 KB
/
main.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
34
35
36
37
38
39
40
41
42
43
44
45
46
const { Client, GatewayIntentBits, REST, Routes } = require('discord.js');
const config = require('./config.json');
const channelID = config.channelID;
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.MessageContent
]
});
client.on("guildMemberAdd", member => {
const embed = {
title: `Hoşgeldin`,
description: `${member} sunucuya katıldı.\nÜye Sayısı: ${member.guild.memberCount}`,
color: 5763719,
thumbnail: {
url: member.user.displayAvatarURL(),
proxy_url: "a",
height: 1,
width: 1
}
};
member.guild.channels.cache.get(channelID).send({embeds: [embed]});
});
client.on("guildMemberRemove", member => {
const embed = {
title: `Görüşürüz`,
description: `${member} sunucumuzdan ayrıldı.\nÜye Sayısı: ${member.guild.memberCount}`,
color: 15548997,
thumbnail: {
url: member.user.displayAvatarURL(),
proxy_url: "a",
height: 1,
width: 1
}
};
member.guild.channels.cache.get(channelID).send({embeds: [embed]});
});
client.login(config.token);