obama-bot/commands/help.js

38 lines
984 B
JavaScript
Raw Normal View History

2020-11-28 16:38:23 +00:00
const { MessageEmbed } = require("discord.js");
const prefix = process.env.BOT_PREFIX || '-';
module.exports.meta = {
name: 'help',
aliases: ['h'],
staffOnly: false
}
/**
*
* @param {Discord.Message} message
* @param {Array<string>} args
*/
2020-11-28 16:38:23 +00:00
module.exports.run = async (message, args) => {
let embed = new MessageEmbed()
.setTitle('Obama bot')
.setDescription(`Epic obama bot help`)
addCmd(embed, 'obamium', 'Spawn obamium');
addCmd(embed, 'vbucks', 'Get free vbucks');
addCmd(embed, 'ping', 'Show the bot\'s ping');
addCmd(embed, 'coins', 'See how much karma/coins you have');
addCmd(embed, 'top', 'Karma leaderboard');
2020-11-28 22:51:35 +00:00
addCmd(embed, 'setcoins', '[Staff command] Manage a user\'s coins')
2020-11-28 16:38:23 +00:00
message.channel.send(embed);
}
/**
*
* @param {MessageEmbed} embed
* @param {string} cmd
* @param {string} text
*/
function addCmd(embed, cmd, text) {
2020-11-28 22:51:35 +00:00
embed.addField(`${prefix}${cmd}`, text, true);
2020-11-28 16:38:23 +00:00
}