From e56b6a807fd741c69ff729ebb9ac509b6de516a7 Mon Sep 17 00:00:00 2001 From: WubzyGD Date: Wed, 31 Mar 2021 19:24:38 -0600 Subject: [PATCH] bugs and info changes --- bot.js | 4 ++-- commands/misc/info.js | 6 +++++- commands/social/pat.js | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bot.js b/bot.js index 400cc08..2122a88 100644 --- a/bot.js +++ b/bot.js @@ -6,7 +6,7 @@ const ora = require('ora'); const mongoose = require('mongoose'); client.misc = { - savers: ['497598953206841375', '480535078150340609'], + savers: ['497598953206841375', '480535078150340609', '468903364533420074'], activeDMs: new Discord.Collection(), statusPings: new Discord.Collection(), startup: new Date(), @@ -65,7 +65,7 @@ async function init() { ['command', 'event', 'response'].forEach(x => require(`./handle/${x}`)(client)); - client.developers = ["330547934951112705", "673477059904929802", "468903364533420074"]; + client.developers = ["330547934951112705", "673477059904929802"]; client.utils = {}; client.utils.logch = async () => {return client.guilds.cache.get('762707532417335296').channels.cache.get('762732961753595915');}; diff --git a/commands/misc/info.js b/commands/misc/info.js index bbde0bb..1169398 100644 --- a/commands/misc/info.js +++ b/commands/misc/info.js @@ -1,6 +1,8 @@ const Discord = require("discord.js"); const moment = require('moment'); +const UserData = require('../../models/user'); + module.exports = { name: "info", aliases: ["i", "botinfo", "bot"], @@ -14,13 +16,15 @@ module.exports = { async execute(message, msg, args, cmd, prefix, mention, client) { 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() .setAuthor("About Me!", client.users.cache.get(client.developers[Math.floor(Math.random() * client.developers.length)]).avatarURL()) .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 ^^`) .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("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) .setColor("c375f0") .setFooter("Natsuki") diff --git a/commands/social/pat.js b/commands/social/pat.js index aa0870f..5699daa 100644 --- a/commands/social/pat.js +++ b/commands/social/pat.js @@ -39,7 +39,7 @@ module.exports = { pats.markModified(`against.${mention.id}`); pats.save(); 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'}!`) .setImage(String(Array.from(saves.values())[Math.floor(Math.random() * saves.size)])) .setColor('52c7bb')