summaryrefslogtreecommitdiff
path: root/strings.js
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-12-30 13:11:06 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2017-12-30 13:11:06 +0100
commitc6c5027865743328d0542246fef70e0fafe0f0f1 (patch)
tree9348d4afa900c170aa534f602b6f7a823292a831 /strings.js
parentabd33f47fbbcc92610b83341c61f5d1911eed590 (diff)
parent1881a2ecd48be772fd83b20068fe9946f1365eeb (diff)
downloaddiscordbot-develop.tar.gz
discordbot-develop.zip
Merge branch 'master' into developdevelop
Diffstat (limited to 'strings.js')
-rw-r--r--strings.js48
1 files changed, 48 insertions, 0 deletions
diff --git a/strings.js b/strings.js
new file mode 100644
index 0000000..546dfc0
--- /dev/null
+++ b/strings.js
@@ -0,0 +1,48 @@
+#!/usr/bin/node
+/* jshint esnext:true */
+"use strict";
+
+const emoji = require("discord-emoji"),
+ oneLine = require("common-tags").oneLine,
+ Promise = require("bluebird"),
+ api = require("./api"),
+ util = require("./util");
+const strings = module.exports;
+
+const MATCH_HISTORY_LEN = parseInt(process.env.MATCH_HISTORY_LEN) || 3,
+ PREVIEW = process.env.PREVIEW != "false",
+ ROOTURL = (PREVIEW? "https://preview.vainsocial.com/":"https://vainsocial.com/");
+
+// tell the user that they need to store their name
+module.exports.unknown = (msg) =>
+ `You're unknown to our service. Try ${util.usg(msg, "vme")}.`;
+
+module.exports.notFound = (ign) =>
+ `Could not find ${ign}.`;
+
+module.exports.noMatches = (ign) =>
+ `Could not find any casual/ranked matches for ${ign}.`;
+
+module.exports.tooFewMatches = (ign) =>
+ `Could not find that many casual/ranked matches for ${ign}.`;
+
+module.exports.loading = (ign) =>
+ `Loading data for ${ign}…`;
+
+module.exports.emojiCount = [ emoji.symbols.one, emoji.symbols.two, emoji.symbols.three,
+ emoji.symbols.four, emoji.symbols.five, emoji.symbols.six,
+ emoji.symbols.seven, emoji.symbols.eight, emoji.symbols.nine,
+ emoji.symbols.ten
+];
+
+module.exports.profile = "Profile";
+module.exports.lastMatch = "Last Match";
+
+// based on impact score float, return an Emoji
+module.exports.emojifyScore = (score) => {
+ if (score > 0.7) return emoji.people.heart_eyes;
+ if (score > 0.6) return emoji.people.blush;
+ if (score > 0.5) return emoji.people.yum;
+ if (score > 0.3) return emoji.people.relieved;
+ return emoji.people.upside_down;
+};