diff --git a/commands/copypasta.js b/commands/copypasta.js index 156c749..1d2289f 100644 --- a/commands/copypasta.js +++ b/commands/copypasta.js @@ -8,6 +8,11 @@ module.exports.meta = { epicOnly: true } +/** + * + * @param {Discord.Message} message + * @param {Array} args + */ module.exports.run = async (message, args) => { let copypastas = await fs.readdir(__dirname + '/copypastas'); let pasta = copypastas.find((p) => p.toLowerCase() == args[0]?.toLowerCase()); @@ -21,7 +26,7 @@ module.exports.run = async (message, args) => { .toString('utf-8') .split('\n'); - lines.forEach(line => { + lines.forEach(async line => { await message.channel.send(line, { tts: true }); }); } \ No newline at end of file diff --git a/commands/help.js b/commands/help.js index 0740f54..bfa46dc 100644 --- a/commands/help.js +++ b/commands/help.js @@ -7,6 +7,11 @@ module.exports.meta = { staffOnly: false } +/** + * + * @param {Discord.Message} message + * @param {Array} args + */ module.exports.run = async (message, args) => { let embed = new MessageEmbed() .setTitle('Obama bot') diff --git a/commands/info.js b/commands/info.js index c78ed50..623dca2 100644 --- a/commands/info.js +++ b/commands/info.js @@ -6,6 +6,11 @@ module.exports.meta = { staffOnly: false } +/** + * + * @param {Discord.Message} message + * @param {Array} args + */ module.exports.run = async (message, args) => { message.channel.send('h'); } \ No newline at end of file diff --git a/commands/karma.js b/commands/karma.js index 3ebe4c3..32fd3b9 100644 --- a/commands/karma.js +++ b/commands/karma.js @@ -9,6 +9,11 @@ module.exports.meta = { const karma = require('../util/karma').karma; const coins = require('../util/karma').coins; +/** + * + * @param {Discord.Message} message + * @param {Array} args + */ module.exports.run = async (message, args) => { const karmaID = '733339045463064607'; const coinsID = '733339908273602662'; diff --git a/commands/ping.js b/commands/ping.js index a97d668..d274502 100644 --- a/commands/ping.js +++ b/commands/ping.js @@ -7,6 +7,11 @@ module.exports.meta = { staffOnly: false } +/** + * + * @param {Discord.Message} message + * @param {Array} args + */ module.exports.run = async (message, args) => { try { let embed = new Discord.MessageEmbed() diff --git a/commands/setcoins.js b/commands/setcoins.js index ffa24e5..586365f 100644 --- a/commands/setcoins.js +++ b/commands/setcoins.js @@ -9,6 +9,11 @@ module.exports.meta = { const karma = require('../util/karma').karma; const coins = require('../util/karma').coins; +/** + * + * @param {Discord.Message} message + * @param {Array} args + */ module.exports.run = async (message, args) => { let member = message.mentions.members.first(); if (!member) return message.channel.send('You need to @mention a member!') diff --git a/commands/test.js b/commands/test.js index 2be06c3..922b4e6 100644 --- a/commands/test.js +++ b/commands/test.js @@ -4,6 +4,11 @@ module.exports.meta = { staffOnly: false } +/** + * + * @param {Discord.Message} message + * @param {Array} args + */ module.exports.run = async (message, args) => { message.channel.send('cool, your test worked. i hope you\'re happy now'); } \ No newline at end of file diff --git a/commands/top.js b/commands/top.js index ce43b07..f80b901 100644 --- a/commands/top.js +++ b/commands/top.js @@ -9,9 +9,14 @@ module.exports.meta = { const karma = require('../util/karma').karma; const coins = require('../util/karma').coins; +/** + * + * @param {Discord.Message} message + * @param {Array} args + */ module.exports.run = async (message, args) => { - const karmaID1 = '733339045463064607'; - const karmaEmote1 = message.guild.emojis.cache.get(karmaID1).toString(); + const karmaID = '733339045463064607'; + const karmaEmote = message.guild.emojis.cache.get(karmaID).toString(); let karmaboard = []; karma.keyArray().forEach(uid => { karmaboard.push({id: uid, karma: karma.get(uid)}); @@ -22,12 +27,12 @@ module.exports.run = async (message, args) => { let embed = new Discord.MessageEmbed() .setTitle('Karma Leaderboard') - .setDescription(karmaEmote1 + ' Karma leaderboard - Top 12 for ' + message.guild.name); + .setDescription(karmaEmote + ' Karma leaderboard - Top 12 for ' + message.guild.name); for (let x=0; x < 12; x += 1) { if (!karmaboard[x]) break; let u = message.guild.members.cache.get(karmaboard[x].id); - if (!u) embed.addField(`${x+1}. [Unknown user]`, `${karmaEmote1} ${karmaboard[x].karma} Karma`, true); else embed.addField(`${x+1}. ${u.user.username}#${u.user.discriminator} ${u.user.bot ? '(Bot)' : ''}`, `${karmaEmote1} ${karmaboard[x].karma} Karma`, true); + if (!u) embed.addField(`${x+1}. [Unknown user]`, `${karmaEmote} ${karmaboard[x].karma} Karma`, true); else embed.addField(`${x+1}. ${u.user.username}#${u.user.discriminator} ${u.user.bot ? '(Bot)' : ''}`, `${karmaEmote} ${karmaboard[x].karma} Karma`, true); } message.channel.send(embed); diff --git a/commands/truefan.js b/commands/truefan.js index cbe54fd..69cce9d 100644 --- a/commands/truefan.js +++ b/commands/truefan.js @@ -9,6 +9,11 @@ module.exports.meta = { const roleID = '718862546395988078'; const channelID = '718908301555007518'; +/** + * + * @param {Discord.Message} message + * @param {Array} args + */ module.exports.run = async (message, args) => { let target = message.mentions.members.first(); let role = message.guild.roles.cache.get(roleID); diff --git a/commands/vbucks.js b/commands/vbucks.js index 3678792..f06a78d 100644 --- a/commands/vbucks.js +++ b/commands/vbucks.js @@ -6,6 +6,11 @@ module.exports.meta = { staffOnly: false } +/** + * + * @param {Discord.Message} message + * @param {Array} args + */ module.exports.run = async (message, args) => { let embed = new Discord.MessageEmbed() .setAuthor('Free Vbucks 100% legit no virus', 'https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fdiscordemoji.com%2Fassets%2Femoji%2FVBuck.png&f=1&nofb=1')