summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-05-10 19:33:09 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-05-10 19:33:09 +0200
commit2fad80a5350b5c9a1eeaa5062996b63cabace690 (patch)
treead77c21fd92d61f5de078272c79c9dc0e1178879
parentd158b9dabfc8b6c9a6c13e3307be455957b95a98 (diff)
downloaddiscordbot-2fad80a5350b5c9a1eeaa5062996b63cabace690.tar.gz
discordbot-2fad80a5350b5c9a1eeaa5062996b63cabace690.zip
encode embed urls, fixes players with spaces
-rw-r--r--util.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.js b/util.js
index 0f37918..b86b8a7 100644
--- a/util.js
+++ b/util.js
@@ -23,7 +23,7 @@ module.exports.vainsocialEmbed = (title, link, command) => {
return new Discord.RichEmbed()
.setTitle(title)
.setColor("#55ADD3")
- .setURL(ROOTURL + link + util.track(command))
+ .setURL(ROOTURL + encodeURIComponent(link) + util.track(command))
.setAuthor("VainSocial" + (PREVIEW? " preview":""), ROOTURL + "images/brands/logo-blue.png",
ROOTURL + util.track(command))
.setFooter("VainSocial" + (PREVIEW? " preview":""), ROOTURL + "images/brands/logo-blue.png")