mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 19:13:31 +01:00
colorAsHex should return hex (fixes #188)
This commit is contained in:
@@ -130,7 +130,7 @@ var Role = (function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Role.prototype.colorAsHex = function colorAsHex() {
|
Role.prototype.colorAsHex = function colorAsHex() {
|
||||||
var val = this.color.toString();
|
var val = this.color.toString(16);
|
||||||
while (val.length < 6) {
|
while (val.length < 6) {
|
||||||
val = "0" + val;
|
val = "0" + val;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,23 +6,23 @@ exports.__esModule = true;
|
|||||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||||
|
|
||||||
var TokenCacher = (function () {
|
var TokenCacher = (function () {
|
||||||
function TokenCacher() {
|
function TokenCacher() {
|
||||||
_classCallCheck(this, TokenCacher);
|
_classCallCheck(this, TokenCacher);
|
||||||
}
|
}
|
||||||
|
|
||||||
TokenCacher.prototype.setToken = function setToken() {};
|
TokenCacher.prototype.setToken = function setToken() {};
|
||||||
|
|
||||||
TokenCacher.prototype.save = function save() {};
|
TokenCacher.prototype.save = function save() {};
|
||||||
|
|
||||||
TokenCacher.prototype.getToken = function getToken() {
|
TokenCacher.prototype.getToken = function getToken() {
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
TokenCacher.prototype.init = function init(ind) {
|
TokenCacher.prototype.init = function init(ind) {
|
||||||
this.done = true;
|
this.done = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
return TokenCacher;
|
return TokenCacher;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
exports["default"] = TokenCacher;
|
exports["default"] = TokenCacher;
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ export default class Role {
|
|||||||
}
|
}
|
||||||
|
|
||||||
colorAsHex(){
|
colorAsHex(){
|
||||||
var val = this.color.toString();
|
var val = this.color.toString(16);
|
||||||
while(val.length < 6){
|
while(val.length < 6){
|
||||||
val = "0" + val;
|
val = "0" + val;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user