forked from EnosInWork/SocialBot-FiveM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
86 lines (77 loc) · 3.39 KB
/
index.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
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
const Discord = require('discord.js')
const myBot = new Discord.Client({fetchAllMembers: true, partials: ['MESSAGE', 'REACTION']});
const config = require("./config.json")
const fs = require('fs')
const fivereborn = require('fivereborn-query')
myBot.commandes = new Discord.Collection();
myBot.on("message", async message => { if(message.author.bot) return;
if(message.channel.id !== config.channelSecuroServ) return;
let messageArray = message.content.split(" ");
let args = messageArray.slice(0);
message.delete();
let EmbedSecuroServ = new Discord.MessageEmbed()
.setColor('#2F3136')
.setAuthor('Message anonyme', config.imgSecuroServ)
.setDescription(`**${args.join(" ")}**`)
.setFooter("SecuroServ - Service chiffré")
message.channel.send(EmbedSecuroServ).then(m => {})
message.guild.channels.cache.get(config.logsIdChannel).send(`🔐 Nouveau message anonyme → **${message.member.displayName}** (<@${message.author.id}> / ${message.author.id})\n\nContenu du message :\n\`\`\`fix\n${message}\n\`\`\``)
});
myBot.on("message", async message => { if(message.author.bot) return;
if(message.channel.id !== config.channelSnapmatic) return;
let messageArray = message.content.split(" ");
let args = messageArray.slice(0);
message.delete();
let embedSnapmatic = new Discord.MessageEmbed()
.setColor('#2F3136')
.setAuthor('Snapmatic', config.imgSnapmatic)
.setDescription(args.join(" "))
.setFooter(`Nouvelle publication par ${message.member.displayName}`)
message.channel.send(embedSnapmatic).then(m => {})
});
myBot.on("message", async message => { if(message.author.bot) return;
if(message.channel.id !== config.channelLifeInvader) return;
let messageArray = message.content.split(" ");
let args = messageArray.slice(0);
message.delete();
let embedLifeInvader = new Discord.MessageEmbed()
.setColor('#2F3136')
.setAuthor('Life Invader', config.imgLifeInvader)
.setDescription(args.join(" "))
.setFooter(`Nouvelle publication par ${message.member.displayName}`)
message.channel.send(embedLifeInvader).then(m => {
m.react('❤️')
m.react('🔁')
})
});
myBot.on("message", async message => { if(message.author.bot) return;
if(message.channel.id !== config.channelSuggestion) return;
let messageArray = message.content.split(" ");
let args = messageArray.slice(0);
message.delete();
let EmbedSuggestion = new Discord.MessageEmbed()
.setColor('#2F3136')
.setAuthor(`📀 Suggestion`)
.setDescription(`**${args.join(" ")}**`)
.setFooter(`Suggestion ajoutée par ${message.member.displayName}`)
message.channel.send(EmbedSuggestion).then(m => { // Removed support for custom emojis
m.react('👍🏼')
m.react('👎🏼')
})
});
myBot.on("message", async message => { if(message.author.bot) return;
if(message.channel.id !== config.channelBugReport) return;
let messageArray = message.content.split(" ");
let args = messageArray.slice(0);
message.delete();
let EmbedBugReport = new Discord.MessageEmbed()
.setColor('#2F3136')
.setAuthor(`🧰 Rapport de bug`)
.setDescription(`**${args.join(" ")}**`)
.setFooter(`Rapport de bug fourni par ${message.member.displayName}`)
message.channel.send(EmbedBugReport).then(m =>{})
});
myBot.on('ready', () => {
console.log(`${myBot.user.tag} est en ligne.`)
});
myBot.login(config.token)