Files
discord.js/lib/index.js
hydrabolt 1de2c5e5be Added Colors file
removed colours for consistency
2015-10-26 13:36:13 +00:00

38 lines
803 B
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"use strict";
var request = require("superagent");
var Endpoints = require("./Endpoints.js");
var Client = require("./Client.js");
var Colors = require("../ref/colours.js");
var Discord = {
Endpoints: Endpoints,
Client: Client,
Colors: Colors
};
Discord.patchStrings = function () {
defineProperty("bold", "**");
defineProperty("underline", "__");
defineProperty("strike", "~~");
defineProperty("code", "`");
defineProperty("codeblock", "```");
defineProperty("newline", "\n");
Object.defineProperty(String.prototype, "italic", {
get: function get() {
return "*" + this + "*";
}
});
function defineProperty(name, joiner) {
Object.defineProperty(String.prototype, name, {
get: function get() {
return joiner + this + joiner;
}
});
}
};
module.exports = Discord;