-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
48 lines (38 loc) · 1.61 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
const Discord = require('discord.js');
const client = new Discord.Client();
const config = require('./config.json');
const token = process.env.token
client.on("ready", () =>{
console.log("connect as " + client.user.tag +" ")
let utenti = client.guilds.cache.get("685818099383140353").memberCount;
let args = utenti + " Membri";
client.user.setActivity(args, {type: "WATCHING"});
})
client.login("tokenhere")
//Var Compagnie
const compagnie = require("./clan/compagnie")
const sposta = require("./sposta/sposta")
client.on("message", message =>{
if(message.guild != null){
if(message.author.bot != true){
if(message.content.startsWith(">c sposta")){
let utente = message.guild.member(message.mentions.members.first());
sposta(message,client,utente)
}else if(message.channel.id == config.canale1 || message.channel.id == config.canale2){
if(message.content.startsWith(config.prefix + "c")){
compagnie(message,client)
}
}
}
}
})
client.on("guildMemberAdd", member => {
let utenti = client.guilds.cache.get("685818099383140353").memberCount;
let args = utenti + " Membri";
client.user.setActivity(args, {type: "WATCHING"});
})
client.on("guildMemberRemove", member => {
let utenti = client.guilds.cache.get("685818099383140353").memberCount;
let args = utenti + " Membri";
client.user.setActivity(args, {type: "WATCHING"});
})