mirror of
https://github.com/ION606/selmerBot.git
synced 2026-05-14 21:26:54 +00:00
Added the 'help' command. Output is unordered thought
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
module.exports ={
|
||||
name: "game",
|
||||
description: "Play a game using Selmer Bot!",
|
||||
execute(message, args, Discord, Client, bot) {
|
||||
let temp = "Selmer Bot Commands:\n";
|
||||
var keys = bot.commands.keys();
|
||||
for (let i = 0; i < keys.length; i ++) {
|
||||
temp += keys[i].toLowerCase();
|
||||
temp += ` - ${bot.commands.get(keys[i]).description}\n`;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,13 +2,16 @@ module.exports ={
|
||||
name: "help",
|
||||
description: "Gets help for all of Selmer Bot's commands",
|
||||
execute(message, args, Discord, Client, bot) {
|
||||
const newEmbed = new Discord.MessageEmbed()
|
||||
.setColor('#002eff')
|
||||
.setTitle('My professional resume')
|
||||
//.setURL('https://discordjs.guide/popular-topics/embeds.html#embed-preview')
|
||||
//.setDescription('My professional resume')
|
||||
.setImage('https://github.com/ION606/selmerBot/blob/main/Sleemer_Bringsjorgend.png?raw=true')
|
||||
let temp = "***Selmer Bot Commands:***\n";
|
||||
|
||||
message.channel.send({ embeds: [newEmbed] });
|
||||
bot.commands.sort((a, b) => a.name[0] < b.name[0]);
|
||||
|
||||
bot.commands.forEach((comm) => {
|
||||
if (comm.name != 'verify') {
|
||||
temp += `${comm.name.toLowerCase()} - ${comm.description}\n`;
|
||||
}
|
||||
});
|
||||
|
||||
message.channel.send(temp);
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,19 @@ const fs = require('fs');
|
||||
const { exit } = require('process');
|
||||
const BASE_LVL_XP = 20;
|
||||
|
||||
|
||||
//Token area
|
||||
//Adding integration for development mode
|
||||
let token;
|
||||
let inDebugMode = false;
|
||||
if (process.env.token != undefined) {
|
||||
//Use "setx NAME VALUE" in the local powershell terminal to set
|
||||
token = process.env.token;
|
||||
} else {
|
||||
token = require('./config.json').token;
|
||||
inDebugMode = true;
|
||||
}
|
||||
|
||||
// const { token } = require('./config.json');
|
||||
//Heroku part
|
||||
// const { token } = process.env.token;
|
||||
@@ -25,7 +38,14 @@ bot.prefix = prefix;
|
||||
|
||||
|
||||
//MongoDB integration
|
||||
const mongouri = process.env.MONGODB_URI;
|
||||
//Development support
|
||||
let mongouritemp;
|
||||
if (process.env.MONGODB_URI) {
|
||||
mongouritemp = process.env.MONGODB_URI;
|
||||
} else {
|
||||
mongouritemp = require('./config.json');
|
||||
}
|
||||
const mongouri = mongouritemp;
|
||||
const { connect } = require('mongoose');
|
||||
|
||||
bot.on("guildCreate", guild => {
|
||||
@@ -100,8 +120,11 @@ bot.on('ready', async () => {
|
||||
|
||||
|
||||
//Reaction map area
|
||||
|
||||
if (!inDebugMode) {
|
||||
console.log('SLEEMER BOT ONLINE!!!!! OH MY GOD OH MY GOD!!!');
|
||||
} else {
|
||||
console.log("Testing testing 1 2 5...");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -128,4 +151,4 @@ bot.on('messageCreate', (message) => {
|
||||
//Last Line(s)
|
||||
// bot.login(token);
|
||||
|
||||
bot.login(process.env.token);
|
||||
bot.login(token);
|
||||
Reference in New Issue
Block a user