4 Commits

Author SHA1 Message Date
c8e2828043 more 2.1.0 2020-05-18 14:22:09 -05:00
167d69e564 2.1.0 Because versioning is wack 2020-05-18 14:20:50 -05:00
b155c84cfc Merge branch 'master' of https://github.com/Technicolor-creamsicle/Osselbot 2020-05-18 13:58:00 -05:00
2b98f98b1c 2.0.4 FINAL 2020-05-18 13:51:01 -05:00
4 changed files with 18 additions and 12 deletions

View File

@@ -1,5 +1,2 @@
const { ShardingManager } = require('discord.js');
const manager = new ShardingManager('./bot.js', { token: 'Njc4MDkzNjY4NzcwNTEyOTE3.XkdyyA.6n4wvPmzOw-fwuysEoTPU8Cv2x0' });
manager.spawn();
manager.on('shardCreate', shard => console.log(`Launched shard ${shard.id}`));
DEPRICATED

View File

@@ -1,6 +1,6 @@
{
"name": "@technicolor-creamsicle/osselbot",
"version": "2.0.4",
"version": "2.1.0",
"description": "A discord bot on Discord.js",
"main": "index.js",
"dependencies": {

View File

@@ -1,4 +1,4 @@
{
"token" : "Njc4MDkzNjY4NzcwNTEyOTE3.Xr7SNw.XS_D_dEJ7hX6N5Rmnfr_OQpfznU",
"prefix" : ";"
"prefix" : "?"
}

View File

@@ -5,22 +5,30 @@ const prettyMilliseconds = require('pretty-ms');
const config = require("./config.json");
// This is the client
const client = new Discord.Client();
function activity() {
client.user.setActivity(`${client.users.cache.size} of you horrible people`,{ type: 'LISTENING' });
};
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".
client.user.setActivity(`${client.users.cache.size} of you horrible people`,{ type: 'LISTENING' });
activity();
});
//Updates people count
client.on('guildMemberAdd', member => {
console.log(`New member joined: ${member.name} (id: ${member.id}).`);
client.user.setActivity(`${client.users.cache.size} of you horrible people`,{ type: 'LISTENING' });
activity();
});
client.on('guildMemberRemove', member => {
console.log(` member left: ${member.name} (id: ${member.id}).`);
client.user.setActivity(`${client.users.cache.size} of you horrible people`,{ type: 'LISTENING' });
activity();
});
setInterval(activity, 300000);
////// ACTUAL MESSAGE PROCESSING
client.on("message", async message => {
//stops bots from activating the Osselbot
@@ -54,13 +62,14 @@ client.on("message", async message => {
if (command === "stats") {
let embed = new Discord.MessageEmbed()
.setTitle('Stats')
.setAuthor("Osselbot", "https://cdn.discordapp.com/attachments/597814181084921866/711843993914310656/animated-beach-balls-29.gif")
.setColor(0x195080)
.setDescription(`\
**Stats for 0SSELB0T** \n \
**Uptime:** ${prettyMilliseconds(client.uptime)} \n \
**Started at:** ${client.readyAt} \n \
**People:** ${client.users.cache.size}\
`);
**People:** ${client.users.cache.size}`)
.setFooter("osselbot v2.1.0 run version for full info");
return message.channel.send(embed);
};
//////////////////////////////////////////////////////////////////////////////
@@ -134,7 +143,7 @@ client.on("message", async message => {
////////////////////////////////////////////////////////////////////////////////
if (command === "version") {
return message.channel.send("``` ________________________________________\n \
< @technicolor-creamsicle/osselbot@2.0.4 >\n \
< @technicolor-creamsicle/osselbot@2.1.0 >\n \
----------------------------------------\n \
\\ ^__^\n \
\\ (oo)\\_______\n \