qqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqq", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Image manipulation for discord bot or other app", | ||
@@ -28,2 +28,2 @@ "main": "index.js", | ||
} | ||
} | ||
} |
@@ -27,3 +27,3 @@ const Canvas = require('canvas') | ||
}, | ||
wallet: { | ||
regular: { | ||
value: 0, | ||
@@ -33,3 +33,3 @@ text_color: '#ACAEB2', | ||
}, | ||
rank: { | ||
top: { | ||
value: 1, | ||
@@ -140,14 +140,14 @@ text_color: '#ACAEB2', | ||
* | ||
* @param {Number} value User's wallet balance | ||
* @param {Number} value User's Regular balance | ||
* @param {String} textColor Text Color | ||
* @param {String} valueColor Value Color | ||
*/ | ||
setWallet(value = 0, textColor = '#ACAEB2', valueColor = '#FFFFFF') { | ||
if (typeof value !== 'number') throw new TypeError('Wallet value needs to be number!') | ||
if (typeof textColor !== 'string') throw new TypeError('Wallet text color needs to be string!') | ||
if (typeof valueColor !== 'string') throw new TypeError('Wallet value color needs to be string!') | ||
setRegular(value = 0, textColor = '#ACAEB2', valueColor = '#FFFFFF') { | ||
if (typeof value !== 'number') throw new TypeError('Regular value needs to be number!') | ||
if (typeof textColor !== 'string') throw new TypeError('Regular text color needs to be string!') | ||
if (typeof valueColor !== 'string') throw new TypeError('Regular value color needs to be string!') | ||
this.data.wallet.value = value; | ||
this.data.wallet.text_color = textColor | ||
this.data.wallet.value_color = valueColor; | ||
this.data.regular.value = value; | ||
this.data.regular.text_color = textColor | ||
this.data.regular.value_color = valueColor; | ||
return this; | ||
@@ -158,14 +158,14 @@ } | ||
* | ||
* @param {Number} value User's leaderboard rank | ||
* @param {Number} value User's leaderboard top | ||
* @param {String} textColor Text Color | ||
* @param {String} valueColor Value Color | ||
*/ | ||
setRank(value = 0, textColor = '#ACAEB2', valueColor = '#FFFFFF') { | ||
if (typeof value !== 'number') throw new TypeError('rank value needs to be number!') | ||
if (typeof textColor !== 'string') throw new TypeError('rank text color needs to be string!') | ||
if (typeof valueColor !== 'string') throw new TypeError('rank value color needs to be string!') | ||
setTop(value = 0, textColor = '#ACAEB2', valueColor = '#FFFFFF') { | ||
if (typeof value !== 'number') throw new TypeError('top value needs to be number!') | ||
if (typeof textColor !== 'string') throw new TypeError('top text color needs to be string!') | ||
if (typeof valueColor !== 'string') throw new TypeError('top value color needs to be string!') | ||
this.data.rank.value = value; | ||
this.data.rank.text_color = textColor | ||
this.data.rank.value_color = valueColor; | ||
this.data.top.value = value; | ||
this.data.top.text_color = textColor | ||
this.data.top.value_color = valueColor; | ||
return this; | ||
@@ -244,15 +244,15 @@ } | ||
ctx.font = '50px Montserrat-SemiBold' | ||
ctx.fillStyle = this.data.wallet.text_color | ||
ctx.fillText('Wallet', 153, 717) | ||
ctx.fillStyle = this.data.rank.text_color | ||
ctx.fillStyle = this.data.regular.text_color | ||
ctx.fillText('Regular', 153, 717) | ||
ctx.fillStyle = this.data.top.text_color | ||
ctx.fillText('Top', 375, 717) | ||
ctx.fillStyle = this.data.leave.text_color | ||
ctx.fillText('leave', 599, 717) | ||
ctx.fillText('Leave', 599, 717) | ||
ctx.font = '41px Montserrat-Medium' | ||
ctx.fillStyle = this.data.wallet.value_color | ||
ctx.fillText(this.data.currency + CurrencyFormat(this.data.wallet.value), 153, 782) | ||
ctx.fillStyle = this.data.rank.value_color | ||
ctx.fillText(CurrencyFormat(this.data.rank.value), 375, 782) | ||
ctx.fillStyle = this.data.regular.value_color | ||
ctx.fillText(this.data.currency + CurrencyFormat(this.data.regular.value), 153, 782) | ||
ctx.fillStyle = this.data.top.value_color | ||
ctx.fillText(CurrencyFormat(this.data.top.value), 375, 782) | ||
ctx.fillStyle = this.data.leave.value_color | ||
@@ -259,0 +259,0 @@ ctx.fillText(this.data.currency + CurrencyFormat(this.data.leave.value), 599, 782) |
911331
11
266