From 91bc1b2d1ea145103a73cd4a46e6a73ce3973f23 Mon Sep 17 00:00:00 2001 From: hydrabolt Date: Sun, 25 Oct 2015 19:34:23 +0000 Subject: [PATCH] added newline modifier --- lib/index.js | 1 + test/bot.1.js | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index aa5cc93e6..2763c3b6c 100644 --- a/lib/index.js +++ b/lib/index.js @@ -16,6 +16,7 @@ Discord.patchStrings = function () { defineProperty("strike", "~~"); defineProperty("code", "`"); defineProperty("codeblock", "```"); + defineProperty("newline", "\n"); Object.defineProperty(String.prototype, "italic", { get: function () { diff --git a/test/bot.1.js b/test/bot.1.js index c7676e505..4917e0f93 100644 --- a/test/bot.1.js +++ b/test/bot.1.js @@ -30,7 +30,12 @@ mybot.on("message", function (message) { perms = JSON.parse(perms); mybot.sendMessage(message, - "one" + "two".italic + "three" + "bold".bold.newline + + "italic".italic.newline + + "underline".underline.newline + + "strike".strike.newline + + "code".code.newline + + "codeblock".codeblock.newline ); });