bugs and info changes

master
Kit Kasune 4 years ago
parent 580b11c0fa
commit e56b6a807f
  1. 4
      bot.js
  2. 6
      commands/misc/info.js
  3. 2
      commands/social/pat.js

@ -6,7 +6,7 @@ const ora = require('ora');
const mongoose = require('mongoose'); const mongoose = require('mongoose');
client.misc = { client.misc = {
savers: ['497598953206841375', '480535078150340609'], savers: ['497598953206841375', '480535078150340609', '468903364533420074'],
activeDMs: new Discord.Collection(), activeDMs: new Discord.Collection(),
statusPings: new Discord.Collection(), statusPings: new Discord.Collection(),
startup: new Date(), startup: new Date(),
@ -65,7 +65,7 @@ async function init() {
['command', 'event', 'response'].forEach(x => require(`./handle/${x}`)(client)); ['command', 'event', 'response'].forEach(x => require(`./handle/${x}`)(client));
client.developers = ["330547934951112705", "673477059904929802", "468903364533420074"]; client.developers = ["330547934951112705", "673477059904929802"];
client.utils = {}; client.utils = {};
client.utils.logch = async () => {return client.guilds.cache.get('762707532417335296').channels.cache.get('762732961753595915');}; client.utils.logch = async () => {return client.guilds.cache.get('762707532417335296').channels.cache.get('762732961753595915');};

@ -1,6 +1,8 @@
const Discord = require("discord.js"); const Discord = require("discord.js");
const moment = require('moment'); const moment = require('moment');
const UserData = require('../../models/user');
module.exports = { module.exports = {
name: "info", name: "info",
aliases: ["i", "botinfo", "bot"], aliases: ["i", "botinfo", "bot"],
@ -14,13 +16,15 @@ module.exports = {
async execute(message, msg, args, cmd, prefix, mention, client) { async execute(message, msg, args, cmd, prefix, mention, client) {
let botData = await require('../../models/bot').findOne({finder: 'lel'}); let botData = await require('../../models/bot').findOne({finder: 'lel'});
let user = await UserData.findOne({uid: message.author.id});
return message.channel.send(new Discord.MessageEmbed() return message.channel.send(new Discord.MessageEmbed()
.setAuthor("About Me!", client.users.cache.get(client.developers[Math.floor(Math.random() * client.developers.length)]).avatarURL()) .setAuthor("About Me!", client.users.cache.get(client.developers[Math.floor(Math.random() * client.developers.length)]).avatarURL())
.setThumbnail(client.user.avatarURL({size: 1024})) .setThumbnail(client.user.avatarURL({size: 1024}))
.setDescription(`I am created by WubzyGD#8766 and Slushie#1234 - a pair conveniently known as NatsukiDev - in JavaScript/Discord.js!\n\nI'm a powerful all-purpose bot with everything you could want or need, and I have my own set of unique skills that you won't find anywhere else ^^`) .setDescription(`I am created by WubzyGD#8766 and Slushie#1234 - a pair conveniently known as NatsukiDev - in JavaScript/Discord.js!\n\nI'm a powerful all-purpose bot with everything you could want or need, and I have my own set of unique skills that you won't find anywhere else ^^`)
.addField("Presence", `I'm currently in **${client.guilds.cache.size}** servers, and I'm watching over approximately **${client.users.cache.size}** people!`) .addField("Presence", `I'm currently in **${client.guilds.cache.size}** servers, and I'm watching over approximately **${client.users.cache.size}** people!`)
.addField("Restarts", botData.restarts, true) .addField("Restarts", botData.restarts, true)
.addField("Commands Executed", botData.commands, true) .addField("Commands Executed", `${botData.commands}${user ? `\nYou: **${user.commands}**|**${Math.floor((user.commands / botData.commands) * 100)}%**` : ''}`, true)
.addField("Last Restart", moment(botData.lastRestart).fromNow(), true) .addField("Last Restart", moment(botData.lastRestart).fromNow(), true)
.setColor("c375f0") .setColor("c375f0")
.setFooter("Natsuki") .setFooter("Natsuki")

@ -39,7 +39,7 @@ module.exports = {
pats.markModified(`against.${mention.id}`); pats.markModified(`against.${mention.id}`);
pats.save(); pats.save();
return message.channel.send(new Discord.MessageEmbed() return message.channel.send(new Discord.MessageEmbed()
.setAuthor(`${message.guild ? message.member.displayName : message.author.username} gives ${message.guild.members.cache.get(mention.id).displayName} a hug!`, message.author.avatarURL()) .setAuthor(`${message.guild ? message.member.displayName : message.author.username} pats ${message.guild.members.cache.get(mention.id).displayName}!`, message.author.avatarURL())
.setDescription(`You've given them **${pats.against[mention.id]}** pat${pats.against[mention.id] === 1 ? '' : 's'}!`) .setDescription(`You've given them **${pats.against[mention.id]}** pat${pats.against[mention.id] === 1 ? '' : 's'}!`)
.setImage(String(Array.from(saves.values())[Math.floor(Math.random() * saves.size)])) .setImage(String(Array.from(saves.values())[Math.floor(Math.random() * saves.size)]))
.setColor('52c7bb') .setColor('52c7bb')

Loading…
Cancel
Save