Files
discord.js/lib/index.js
2015-10-25 19:34:23 +00:00

36 lines
736 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 Discord = {
Endpoints: Endpoints,
Client: Client
};
Discord.patchStrings = function () {
defineProperty("bold", "**");
defineProperty("underline", "__");
defineProperty("strike", "~~");
defineProperty("code", "`");
defineProperty("codeblock", "```");
defineProperty("newline", "\n");
Object.defineProperty(String.prototype, "italic", {
get: function () {
return "*" + this + "*";
}
});
function defineProperty(name, joiner) {
Object.defineProperty(String.prototype, name, {
get: function () {
return joiner + this + joiner;
}
});
}
}
module.exports = Discord;