-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathНужин код.txt
102 lines (91 loc) · 4.35 KB
/
Нужин код.txt
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
client.on("message", (message) => { // ñëó÷àå åñëè áîò çàìåòèò íîâîå ñîîáùåíèå (message)..
if(message.content == "!help"){ //Îí ïðîâåðèò åñëè åãî êîíòåíò (content) ðàâíÿåòñÿ ôðàçå "!privet"
message.channel.send("Ïðèâåò ìîè êîìàíäû: :wave:"); //È â ñëó÷àå åñëè òàê è åñòü îí îòâåòèò íà ñîîáùåíèå ôðàçîé Ïðèâåò! è îòïðàâèò ñìàéëèê
message.channel.send("!help - Óçíàòü ýòîò ñïèñîê");
message.channel.send("!admins - Ñïèñîê àäìèíîâ");
message.channel.send("!groups - Óçíàòü ãðóïïû ñåðâåðà")
message.channel.send("")
} //Çàêðûòèå óñëîâèÿ
}); //Çàêðûòèå ñîáûòèÿ
client.on("message", (message) => {
if(message.content == "!admins"){
message.channel.send("> Cïèñîê àäìèíèñòðàöèè: ")
message.channel.send("> Ðàçðàáîò÷èê áîòà: **Miraqle__**")
message.channel.send("> Îñíîâàòåëü ñåðâåðà: **ziki12** ")
}
}); // Îêîí÷àíèå óñëîâèÿ 2
client.on('message', message => {
if (!message.guild) return;
if (message.content.startsWith('!kick')) {
const user = message.mentions.users.first();
if (user) {
const member = message.guild.member(user);
if (member) {
member.kick('Äîïîëíèòåëüíàÿ ïðè÷èíà, êîòîðàÿ áóäåò îòîáðàæàòüñÿ â æóðíàëàõ àóäèòà').then(() => {
message.reply(`Óñïåøíî êèêíóò: ${user.tag}`);
}).catch(err => {
message.reply(`ß íå ñìîãó êèêíóòü ${user.tag}`);
console.error(err);
});
} else {
message.reply('Ýòîò ïîëüçîâàòåëü íå â ýòîé ãèëüäèè!');
}
} else {
message.reply('Íå óêàçàí ïîëüçîâàòåëü äëÿ êèêà!');
}
}
});
client.on('message', message => {
// Ignore messages that aren't from a guild
if (!message.guild) return;
// if the message content starts with "!ban"
if (message.content.startsWith('!ban')) {
// Assuming we mention someone in the message, this will return the user
// Read more about mentions over at https://discord.js.org/#/docs/main/stable/class/MessageMentions
const user = message.mentions.users.first();
// If we have a user mentioned
if (user) {
// Now we get the member from the user
const member = message.guild.member(user);
// If the member is in the guild
if (member) {
/**
* Ban the member
* Make sure you run this on a member, not a user!
* There are big differences between a user and a member
* Read more about what ban options there are over at
* https://discord.js.org/#/docs/main/stable/class/GuildMember?scrollTo=ban
*/
member.ban({
reason: 'Îí áûë ïëîõèì!',
}).then(() => {
// We let the message author know we were able to ban the person
message.reply(`Óñïåøíî çàáàíåí: ${user.tag}`);
}).catch(err => {
// An error happened
// This is generally due to the bot not being able to ban the member,
// either due to missing permissions or role hierarchy
message.reply('ß íå ìîãó çàáàíèòü ýòîãî ïîëüçîâàòåëÿ');
// Log the error
console.error(err);
});
} else {
// The mentioned user isn't in this guild
message.reply('Ýòîò ïîëüçîâàòåëü íå â ýòîé ãèëüäèè!');
}
} else {
// Otherwise, if no user was mentioned
message.reply('Íå ìîãó çàáàíèòü Äàííîãî ïîëüçîâàòåëÿ ëèáî ðîëü âûñîêàÿ! Èëè åãî íåò!');
}
}
});
client.on("message", (message) => {
if(message.content == "!groups"){
message.channel.send("***Ãðóïïû:***")
message.channel.send("> **Discord-Group: https://discord.gg/eDVqKJC**")
message.channel.send("> **Ãðóïïà âê: vk.com/arcminesky**")
message.channel.send("> **Dev-Group vk.com/arcmine_dev**")
message.channel.send("> **Ìåì ãðóïïà: vk.com/arcmine_memes**")
message.channel.send("> **Ìàãàçèí: https://arcminesky.trademc.org/**")
}
});