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
}
2020-12-27 12:59:54 +00:00
/ * *
*
* @ 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 } \` . \n Check 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
}