Add the jsdoc thingy to every command to fix intellisense

This commit is contained in:
Jan 2020-12-27 13:59:54 +01:00
parent 41fbaa84ce
commit 5149dab7c6
10 changed files with 55 additions and 5 deletions

View file

@ -8,6 +8,11 @@ module.exports.meta = {
epicOnly: true
}
/**
*
* @param {Discord.Message} message
* @param {Array<string>} 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 });
});
}

View file

@ -7,6 +7,11 @@ module.exports.meta = {
staffOnly: false
}
/**
*
* @param {Discord.Message} message
* @param {Array<string>} args
*/
module.exports.run = async (message, args) => {
let embed = new MessageEmbed()
.setTitle('Obama bot')

View file

@ -6,6 +6,11 @@ module.exports.meta = {
staffOnly: false
}
/**
*
* @param {Discord.Message} message
* @param {Array<string>} args
*/
module.exports.run = async (message, args) => {
message.channel.send('h');
}

View file

@ -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<string>} args
*/
module.exports.run = async (message, args) => {
const karmaID = '733339045463064607';
const coinsID = '733339908273602662';

View file

@ -7,6 +7,11 @@ module.exports.meta = {
staffOnly: false
}
/**
*
* @param {Discord.Message} message
* @param {Array<string>} args
*/
module.exports.run = async (message, args) => {
try {
let embed = new Discord.MessageEmbed()

View file

@ -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<string>} 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!')

View file

@ -4,6 +4,11 @@ module.exports.meta = {
staffOnly: false
}
/**
*
* @param {Discord.Message} message
* @param {Array<string>} args
*/
module.exports.run = async (message, args) => {
message.channel.send('cool, your test worked. i hope you\'re happy now');
}

View file

@ -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<string>} 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);

View file

@ -9,6 +9,11 @@ module.exports.meta = {
const roleID = '718862546395988078';
const channelID = '718908301555007518';
/**
*
* @param {Discord.Message} message
* @param {Array<string>} args
*/
module.exports.run = async (message, args) => {
let target = message.mentions.members.first();
let role = message.guild.roles.cache.get(roleID);

View file

@ -6,6 +6,11 @@ module.exports.meta = {
staffOnly: false
}
/**
*
* @param {Discord.Message} message
* @param {Array<string>} 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')