This commit is contained in:
Alex 2020-05-28 09:59:39 +00:00 committed by repl.it user
parent 142e44a415
commit 332469ca00
3 changed files with 4 additions and 19 deletions

View File

@ -1,2 +1,2 @@
language = "nodejs"
run = "npm start"
run = "node --trace-warnings ./src/index.js"

View File

@ -1,4 +1,4 @@
{
"token" : "Njc4MDkzNjY4NzcwNTEyOTE3.Xr7SNw.XS_D_dEJ7hX6N5Rmnfr_OQpfznU",
"prefix" : "?"
"token" : "NzE1MjM2MzUxNjQ5MzgyNDIw.Xs6Wog.lKUAEDIK4CgiFOlDlTmsDYImzJo",
"prefix" : "//"
}

View File

@ -12,29 +12,14 @@ const client = new Discord.Client();
//THIS BOT IS FOR DEVELOPMENT USE ONLY!
//WATCH OUT ON PULL REQUESTS
//CONTACT ALEX BEFORE MERGES
function activity() {
client.user.setActivity(`${client.users.cache.size} of you horrible people`,{ type: 'LISTENING' });
};
client.user.setStatus('dnd', '0SSELB0T DEVELOPMENT')
client.on("ready", () => {
// This event will run if the bot starts, and logs in, successfully.
console.log(`Bot has started, with ${client.users.cache.size} users, in ${client.channels.cache.size} channels of ${client.guilds.cache.size} guilds.`);
// Example of changing the bot's playing game to something useful. `client.user` is what the
// docs refer to as the "ClientUser".
activity();
});
//Updates people count
client.on('guildMemberAdd', member => {
console.log(`New member joined: ${member.name} (id: ${member.id}).`);
activity();
});
client.on('guildMemberRemove', member => {
console.log(` member left: ${member.name} (id: ${member.id}).`);
activity();
});
setInterval(activity, 300000);
////// ACTUAL MESSAGE PROCESSING
client.on("message", async message => {