qqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
Advanced tools
Comparing version 1.1.4 to 1.1.5
{ | ||
"name": "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqq", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "Image manipulation for discord bot or other app", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -42,2 +42,7 @@ const Canvas = require('canvas') | ||
}, | ||
bonus: { | ||
value: 0, | ||
text_color: '#ACAEB2', | ||
value_color: '#FFFFFF' | ||
}, | ||
currency: '' | ||
@@ -188,2 +193,13 @@ } | ||
setBonus(value = 0, textColor = '#ACAEB2', valueColor = '#FFFFFF') { | ||
if (typeof value !== 'number') throw new TypeError('Bank value needs to be number!') | ||
if (typeof textColor !== 'string') throw new TypeError('Bank text color needs to be string!') | ||
if (typeof valueColor !== 'string') throw new TypeError('Bank value color needs to be string!') | ||
this.data.bonus.value = value; | ||
this.data.bonus.text_color = textColor | ||
this.data.bonus.value_color = valueColor; | ||
return this; | ||
} | ||
/** | ||
@@ -256,2 +272,4 @@ * | ||
ctx.fillStyle = this.data.bank.value_color | ||
ctx.fillText(CurrencyFormat(this.data.bonus.value), 675, 782) | ||
ctx.fillStyle = this.data.bonus.value_color | ||
ctx.fillText(this.data.currency + CurrencyFormat(this.data.bank.value), 599, 782) | ||
@@ -258,0 +276,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
912107
281