mirror of
https://github.com/danbulant/discord.js
synced 2026-07-07 20:20:55 +00:00
colorAsHex should return hex (fixes #188)
This commit is contained in:
parent
c8acc17d8e
commit
9fc5a752f8
3 changed files with 14 additions and 14 deletions
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue