Socket
Socket
Sign inDemoInstall

qqqqqqqqqqqqqqqqqqqqqqqqqqqqqq

Package Overview
Dependencies
65
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.8 to 1.3.0

.github/workflows/npm-publish-github-packages.yml

4

package.json
{
"name": "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",
"version": "1.1.8",
"version": "1.3.0",
"description": "Image manipulation for discord bot or other app",

@@ -11,3 +11,3 @@ "main": "index.js",

"type": "git",
"url": "git+https://github.com/razzsmp/canvasdd.git"
"url": "git+https://github.com/KuroXI/discord-canvas.git"
},

@@ -14,0 +14,0 @@ "keywords": [

@@ -27,3 +27,3 @@ const Canvas = require('canvas')

},
wallet: {
wins: {
value: 0,

@@ -33,3 +33,3 @@ text_color: '#ACAEB2',

},
rank: {
bans: {
value: 1,

@@ -39,3 +39,3 @@ text_color: '#ACAEB2',

},
bank: {
leave: {
value: 0,

@@ -45,8 +45,3 @@ text_color: '#ACAEB2',

},
bonus: {
value: 0,
text_color: '#ACAEB2',
value_color: '#FFFFFF'
},
currency: ''
currency: '$'
}

@@ -146,15 +141,14 @@ }

/**
*
* @param {Number} value User's wallet balance
*wins 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!')
setWins(value = 0, textColor = '#ACAEB2', valueColor = '#FFFFFF') {
if (typeof value !== 'number') throw new TypeError('wins value needs to be number!')
if (typeof textColor !== 'string') throw new TypeError('wins text color needs to be string!')
if (typeof valueColor !== 'string') throw new TypeError('wins 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.wins.value = value;
this.data.wins.text_color = textColor
this.data.wins.value_color = valueColor;
return this;

@@ -169,10 +163,10 @@ }

*/
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!')
setBans(value = 0, textColor = '#ACAEB2', valueColor = '#FFFFFF') {
if (typeof value !== 'number') throw new TypeError('bans value needs to be number!')
if (typeof textColor !== 'string') throw new TypeError('bans text color needs to be string!')
if (typeof valueColor !== 'string') throw new TypeError('bans 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.bans.value = value;
this.data.bans.text_color = textColor
this.data.bans.value_color = valueColor;
return this;

@@ -183,28 +177,17 @@ }

*
* @param {Number} value User's bank balance
* @param {Number} value User's leave balance
* @param {String} textColor Text Color
* @param {String} valueColor Value Color
*/
setBank(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!')
setLeave(value = 0, textColor = '#ACAEB2', valueColor = '#FFFFFF') {
if (typeof value !== 'number') throw new TypeError('Leave value needs to be number!')
if (typeof textColor !== 'string') throw new TypeError('Leave text color needs to be string!')
if (typeof valueColor !== 'string') throw new TypeError('Leave value color needs to be string!')
this.data.bank.value = value;
this.data.bank.text_color = textColor
this.data.bank.value_color = valueColor;
this.data.leave.value = value;
this.data.leave.text_color = textColor
this.data.leave.value_color = valueColor;
return this;
}
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;
}
/**

@@ -252,28 +235,28 @@ *

ctx.fillStyle = this.data.user.usernameColor
ctx.font = '65px Nimbus-Sans'
ctx.font = '65px Montserrat-Bold'
ctx.fillText(this.data.user.username, 375, 513, 700)
ctx.fillStyle = this.data.user.discriminatorColor
ctx.font = '55px Nimbus-Sans'
ctx.font = '55px Montserrat-Bold'
ctx.fillText('#' + this.data.user.discriminator, 375, 577, 700)
} else {
ctx.fillStyle = this.data.user.usernameColor
ctx.font = '65px Nimbus-Sans'
ctx.font = '65px Montserrat-Bold'
ctx.fillText(this.data.user.username, 375, 583, 700)
}
ctx.font = '50px Montserrat-SemiBold'
ctx.fillStyle = this.data.wallet.text_color
ctx.fillText('Regular', 153, 717)
ctx.fillStyle = this.data.rank.text_color
ctx.fillText('Fake', 375, 717)
ctx.fillStyle = this.data.bank.text_color
ctx.fillText('Leave', 599, 717)
ctx.fillStyle = this.data.wins.text_color
ctx.fillText('Wins', 153, 717)
ctx.fillStyle = this.data.bans.text_color
ctx.fillText('4v4Ban', 375, 717)
ctx.fillStyle = this.data.leave.text_color
ctx.fillText('Nothing', 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.bank.value_color
ctx.fillText(this.data.currency + CurrencyFormat(this.data.bank.value), 599, 782)
ctx.fillStyle = this.data.wins.value_color
ctx.fillText(this.data.currency + CurrencyFormat(this.data.wins.value), 153, 782)
ctx.fillStyle = this.data.bans.value_color
ctx.fillText(CurrencyFormat(this.data.bans.value), 375, 782)
ctx.fillStyle = this.data.leave.value_color
ctx.fillText(this.data.currency + CurrencyFormat(this.data.leave.value), 599, 782)

@@ -297,2 +280,2 @@ ctx.fillStyle= this.data.seperator.color

module.exports = Currency
module.exports = Currency
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc