Merge branch 'dev' of https://github.com/Technicolor-creamsicle/Osselbot into dev
This commit is contained in:
commit
1a89803d36
2
.replit
2
.replit
|
@ -1,2 +1,2 @@
|
||||||
language = "nodejs"
|
language = "nodejs"
|
||||||
run = "npm start"
|
run = "node --trace-warnings ./src/index.js"
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"token" : "Njc4MDkzNjY4NzcwNTEyOTE3.Xr7SNw.XS_D_dEJ7hX6N5Rmnfr_OQpfznU",
|
"token" : "NzE1MjM2MzUxNjQ5MzgyNDIw.Xs6Wog.lKUAEDIK4CgiFOlDlTmsDYImzJo",
|
||||||
"prefix" : "//"
|
"prefix" : "//"
|
||||||
}
|
}
|
||||||
|
|
17
src/index.js
17
src/index.js
|
@ -12,29 +12,14 @@ const client = new Discord.Client();
|
||||||
//THIS BOT IS FOR DEVELOPMENT USE ONLY!
|
//THIS BOT IS FOR DEVELOPMENT USE ONLY!
|
||||||
//WATCH OUT ON PULL REQUESTS
|
//WATCH OUT ON PULL REQUESTS
|
||||||
//CONTACT ALEX BEFORE MERGES
|
//CONTACT ALEX BEFORE MERGES
|
||||||
|
client.user.setStatus('dnd', '0SSELB0T DEVELOPMENT')
|
||||||
function activity() {
|
|
||||||
client.user.setActivity(`${client.users.cache.size} of you horrible people`,{ type: 'LISTENING' });
|
|
||||||
};
|
|
||||||
|
|
||||||
client.on("ready", () => {
|
client.on("ready", () => {
|
||||||
// This event will run if the bot starts, and logs in, successfully.
|
// 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.`);
|
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
|
// Example of changing the bot's playing game to something useful. `client.user` is what the
|
||||||
// docs refer to as the "ClientUser".
|
// 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
|
////// ACTUAL MESSAGE PROCESSING
|
||||||
client.on("message", async message => {
|
client.on("message", async message => {
|
||||||
|
|
Loading…
Reference in New Issue