mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
Added setAvatar
This commit is contained in:
37
lib/index.js
37
lib/index.js
@@ -1 +1,36 @@
|
||||
"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 get(){return "*" + this + "*";}});function defineProperty(name,joiner){Object.defineProperty(String.prototype,name,{get:function get(){return joiner + this + joiner;}});}};module.exports = Discord;
|
||||
"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 get() {
|
||||
return "*" + this + "*";
|
||||
}
|
||||
});
|
||||
|
||||
function defineProperty(name, joiner) {
|
||||
Object.defineProperty(String.prototype, name, {
|
||||
get: function get() {
|
||||
return joiner + this + joiner;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = Discord;
|
||||
Reference in New Issue
Block a user