diff --git a/README.md b/README.md index 407e601..68091b4 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # DougleyBot -[![Version](https://img.shields.io/badge/Version-1.2.9-green.svg?style=flat-square)](https://github.com/SteamingMutt/DougleyBot/releases) +[![Version](https://img.shields.io/badge/Version-1.2.10-green.svg?style=flat-square)](https://github.com/SteamingMutt/DougleyBot/releases) [![Status](https://img.shields.io/badge/Status-Ready-green.svg?style=flat-square)]() [![Node](https://img.shields.io/badge/Node-4.2.2-blue.svg?style=flat-square)](http://nodejs.org) [![NPM](https://img.shields.io/badge/NPM-3.5.0-blue.svg?style=flat-square)](http://nodejs.org) diff --git a/discord_bot.js b/discord_bot.js index cee0ba1..3df1f05 100644 --- a/discord_bot.js +++ b/discord_bot.js @@ -10,7 +10,7 @@ var VersionChecker = require("./versioncheck"); var maintenance; -var version = "1.2.9"; +var version = "1.2.10"; var Discord = require("discord.js"); @@ -20,6 +20,8 @@ var youtube_plugin = new yt(); var min = 1; var max = 671; +var cmdPrefix = '!' + //Allowed send file types for !iff var ext = [".jpg",".jpeg",".gif",".png"] var imgDirectory = "./images/" @@ -892,10 +894,9 @@ This will check if given message will correspond to a command defined in the com This will work, so long as the bot isn't overloaded or still busy. ======================== */ - bot.on("message", function (msg) { // check if message is a command - if(msg.author.id != bot.user.id && (msg.content[0] === '!')){ + if(msg.author.id != bot.user.id && (msg.content[0] === cmdPrefix)){ if(msg.author.equals(bot.user)) { return; } if (maintenance == "true") { bot.sendMessage(msg.channel, "Hey "+msg.sender + ", I'm in maintenance mode, I can't take commands right now."); @@ -909,7 +910,7 @@ bot.on("message", function (msg) { //help is special since it iterates over the other commands bot.sendMessage(msg.channel, "Ok "+msg.sender+", I've send you a list of commands via DM."); for(var cmd in commands) { - var info = "!" + cmd; + var info = cmdPrefix + cmd; var usage = commands[cmd].usage; if(usage){ info += " " + usage; diff --git a/package.json b/package.json index 19c3386..1448052 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "DougleyBot", - "version": "1.2.9", + "version": "1.2.10", "description": "Bot for Discord app", "readme": "README.md", "maintainers": [],