diff --git a/.env.example b/.env.example index 13e7218..0cbf3b5 100644 --- a/.env.example +++ b/.env.example @@ -2,6 +2,9 @@ # Required ########### +# Put environment type here (development, staging, or production) +NODE_ENV=development + # Put Discord token here TOKEN= # Put MongoDB database URL here diff --git a/assets/pages/help.pug b/assets/pages/help.pug index d6c2619..3fc6b19 100644 --- a/assets/pages/help.pug +++ b/assets/pages/help.pug @@ -27,7 +27,7 @@ body article#markdown.markdown-body h1#img-srchttpsrawgithubusercontentcomtheessemesmbot-rewritemasteresmbotpng-width64-esmbot-dev-command-list img(src='https://raw.githubusercontent.com/TheEssem/esmBot-rewrite/master/esmbot.png' width='64') - | esmBot Dev Command List + | esmBot Command List p by Essem#9261 p strong diff --git a/commands/emote.js b/commands/emote.js index c1ab77b..2fe352f 100644 --- a/commands/emote.js +++ b/commands/emote.js @@ -1,6 +1,7 @@ const emojiRegex = require("emoji-regex"); exports.run = async (message, args) => { + if (args.length === 0) return `${message.author.mention}, you need to provide an emoji!`; if (args[0].match(/^$/)) { return `https://cdn.discordapp.com/emojis/${args[0].replace(/^<(a)?:.+:(\d+)>$/, "$2")}.${args[0].replace(/^<(a)?:.+:(\d+)>$/, "$1") === "a" ? "gif" : "png"}`; } else if (args[0].match(emojiRegex)) { @@ -14,7 +15,7 @@ exports.run = async (message, args) => { } }; -exports.aliases = ["e", "em", "hugemoji", "hugeemoji"]; +exports.aliases = ["e", "em", "hugemoji", "hugeemoji", "emoji"]; exports.category = 1; exports.help = "Gets a raw emote image"; exports.params = "[emote]"; \ No newline at end of file diff --git a/commands/help.js b/commands/help.js index a972cdc..41e1786 100644 --- a/commands/help.js +++ b/commands/help.js @@ -11,11 +11,10 @@ exports.run = async (message, args) => { const aliases = Array.from(collections.aliases.keys()); if (args.length !== 0 && (commands.includes(args[0].toLowerCase()) || aliases.includes(args[0].toLowerCase()))) { const info = aliases.includes(args[0].toLowerCase()) ? collections.info.get(collections.aliases.get(args[0].toLowerCase())) : collections.info.get(args[0].toLowerCase()); - console.log(collections.aliases.get(args[0].toLowerCase())); const embed = { "embed": { "author": { - "name": "esmBot Dev Help", + "name": "esmBot Help", "icon_url": client.user.avatarURL }, "title": `${guild.prefix}${aliases.includes(args[0].toLowerCase()) ? collections.aliases.get(args[0].toLowerCase()) : args[0].toLowerCase()}`, @@ -83,7 +82,7 @@ exports.run = async (message, args) => { embeds.push({ "embed": { "author": { - "name": "esmBot Dev Help", + "name": "esmBot Help", "icon_url": client.user.avatarURL }, "title": value.title, diff --git a/commands/info.js b/commands/info.js index b439ed5..6c546f2 100644 --- a/commands/info.js +++ b/commands/info.js @@ -1,17 +1,22 @@ const client = require("../utils/client.js"); -const dev = client.users.get(process.env.OWNER); -const artist = client.users.get("401980971517214723"); +const { version } = require("../package.json"); exports.run = async (message) => { + const dev = client.users.get(process.env.OWNER); + const artist = client.users.get("401980971517214723"); const infoEmbed = { "embed": { - "description": "**You are currently using esmBot Dev! Things may change at any time without warning and there will be bugs. Many bugs.**", + "description": process.env.NODE_ENV === "development" ? "**You are currently using esmBot Dev! Things may change at any time without warning and there will be bugs. Many bugs.**" : "", "color": 16711680, "author": { "name": "esmBot Info/Credits", "icon_url": client.user.avatarURL }, "fields": [{ + "name": "ℹī¸ Version:", + "value": `v${version}${process.env.NODE_ENV === "development" ? "-dev" : ""}` + }, + { "name": "📝 Credits:", "value": `Bot by **${dev.username}#${dev.discriminator}**\nIcon by **${artist.username}#${artist.discriminator}**` }, diff --git a/commands/invite.js b/commands/invite.js index 7191dcc..01cf100 100644 --- a/commands/invite.js +++ b/commands/invite.js @@ -1,5 +1,5 @@ exports.run = async (message) => { - return `${message.author.mention}, you can invite me to your server here: `; + return `${message.author.mention}, you can invite me to your server here: `; }; exports.category = 1; diff --git a/commands/stats.js b/commands/stats.js index a39a613..baa3b89 100644 --- a/commands/stats.js +++ b/commands/stats.js @@ -13,10 +13,10 @@ exports.run = async (message) => { "icon_url": client.user.avatarURL }, "color": 16711680, - "description": "**You are currently using esmBot Dev! Things may change at any time without warning and there will be bugs. Many bugs.**", + "description": process.env.NODE_ENV === "development" ? "**You are currently using esmBot Dev! Things may change at any time without warning and there will be bugs. Many bugs.**" : "", "fields": [{ "name": "Version", - "value": `v${version}-dev` + "value": `v${version}${process.env.NODE_ENV === "development" ? "-dev" : ""}` }, { "name": "Memory Usage",