obama-bot/commands/help.js

41 lines
1.2 KiB
JavaScript
Raw Permalink Normal View History

2020-11-28 16:38:23 +00:00
const { MessageEmbed } = require("discord.js");
2020-12-27 13:32:05 +00:00
const { client } = require("..");
2020-11-28 16:38:23 +00:00
const prefix = process.env.BOT_PREFIX || '-';
module.exports.meta = {
name: 'help',
2020-12-27 13:32:05 +00:00
aliases: ['info'],
2020-11-28 16:38:23 +00:00
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
2020-12-27 13:32:05 +00:00
embed.addField('\u200b', `This bot was made by \`${client.users.cache.get('284323826165350400')?.tag}\`.\nCheck out the source code [here](https://gitea.janderedev.xyz/Jan/obama-bot "Click me!").`, false);
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
}