mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Added setAvatar
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
"use strict";
|
||||
/* global Buffer */
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
@@ -21,6 +22,14 @@ var Resolver = (function () {
|
||||
this.internal = internal;
|
||||
}
|
||||
|
||||
Resolver.prototype.resolveToBase64 = function resolveToBase64(resource) {
|
||||
if (resource instanceof Buffer) {
|
||||
resource = resource.toString("base64");
|
||||
resource = "data:image/jpg;base64," + resource;
|
||||
}
|
||||
return resource;
|
||||
};
|
||||
|
||||
Resolver.prototype.resolveInviteID = function resolveInviteID(resource) {
|
||||
if (resource instanceof Invite) {
|
||||
return resource.id;
|
||||
|
||||
Reference in New Issue
Block a user