neekuro 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,63 +1,63 @@
1
- {
2
- "$schema": "https://json.schemastore.org/package.json",
3
- "name": "neekuro",
4
- "version": "2.0.1",
5
- "description": "Una biblioteca de imágenes con temática de anime para bots de Discord.",
6
- "main": "sources/main/index.js",
7
- "types": "sources/typings/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "import": {
11
- "types": "./sources/typings/index.d.ts",
12
- "default": "./sources/main/index.js"
13
- },
14
- "require": {
15
- "types": "./sources/typings/index.d.ts",
16
- "default": "./sources/main/index.js"
17
- }
18
- }
19
- },
20
- "directories": {
21
- "test": "test"
22
- },
23
- "files": [
24
- "sources",
25
- "README.md"
26
- ],
27
- "contributors": [
28
- "cacao0027 <kzmkuro@gmail.com>"
29
- ],
30
- "author": "cacao0027 <kzmkuro@gmail.com>",
31
- "keywords": [
32
- "anime",
33
- "acción",
34
- "gifs",
35
- "imagenes",
36
- "nsfw",
37
- "sfw",
38
- "discord",
39
- "action",
40
- "images"
41
- ],
42
- "license": "ISC",
43
- "scripts": {
44
- "test": "nodemon node ./test/main.test.js"
45
- },
46
- "engines": {
47
- "node": ">=20.12.2"
48
- },
49
- "dependencies": {
50
- "canvas": "^3.1.0",
51
- "hex-color-regex": "^1.1.0",
52
- "neekuro": "file:",
53
- "node-fetch": "^3.3.2"
54
- },
55
- "repository": {
56
- "type": "git",
57
- "url": "git+https://github.com/CacaoNk0027/neekuro_package.git"
58
- },
59
- "bugs": {
60
- "url": "https://github.com/CacaoNk0027/neekuro_package/issues"
61
- },
62
- "homepage": "https://github.com/CacaoNk0027/neekuro_package#readme"
63
- }
1
+ {
2
+ "$schema": "https://json.schemastore.org/package.json",
3
+ "name": "neekuro",
4
+ "version": "2.0.2",
5
+ "description": "Una biblioteca de imágenes con temática de anime para bots de Discord.",
6
+ "main": "sources/main/index.js",
7
+ "types": "sources/typings/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": {
11
+ "types": "./sources/typings/index.d.ts",
12
+ "default": "./sources/main/index.js"
13
+ },
14
+ "require": {
15
+ "types": "./sources/typings/index.d.ts",
16
+ "default": "./sources/main/index.js"
17
+ }
18
+ }
19
+ },
20
+ "directories": {
21
+ "test": "test"
22
+ },
23
+ "files": [
24
+ "sources",
25
+ "README.md"
26
+ ],
27
+ "contributors": [
28
+ "cacao0027 <kzmkuro@gmail.com>"
29
+ ],
30
+ "author": "cacao0027 <kzmkuro@gmail.com>",
31
+ "keywords": [
32
+ "anime",
33
+ "acción",
34
+ "gifs",
35
+ "imagenes",
36
+ "nsfw",
37
+ "sfw",
38
+ "discord",
39
+ "action",
40
+ "images"
41
+ ],
42
+ "license": "ISC",
43
+ "scripts": {
44
+ "test": "nodemon node ./test/main.test.js"
45
+ },
46
+ "engines": {
47
+ "node": ">=20.12.2"
48
+ },
49
+ "dependencies": {
50
+ "canvas": "^3.1.0",
51
+ "hex-color-regex": "^1.1.0",
52
+ "neekuro": "file:",
53
+ "node-fetch": "^3.3.2"
54
+ },
55
+ "repository": {
56
+ "type": "git",
57
+ "url": "git+https://github.com/CacaoNk0027/neekuro_package.git"
58
+ },
59
+ "bugs": {
60
+ "url": "https://github.com/CacaoNk0027/neekuro_package/issues"
61
+ },
62
+ "homepage": "https://github.com/CacaoNk0027/neekuro_package#readme"
63
+ }
@@ -56,31 +56,31 @@ class Welcome {
56
56
  */
57
57
  this.data = {
58
58
  font: 'arial',
59
- width: 1024,
60
- height: 450,
59
+ width: 1140,
60
+ height: 520,
61
61
  background: {
62
62
  type: 'color',
63
63
  value: '#23272A'
64
64
  },
65
65
  avatar: {
66
66
  source: null,
67
- x: 455,
67
+ x: 448,
68
68
  y: 80,
69
69
  radio: 120,
70
70
  border: "#F7F7F7"
71
71
  },
72
72
  title: {
73
73
  content: "¡Bienvenido!",
74
- x: 590,
75
- y: 450,
76
- font_size: 40,
74
+ x: 565,
75
+ y: 400,
76
+ font_size: 55,
77
77
  text_color: '#FFFFFF'
78
78
  },
79
79
  description: {
80
80
  content: 'Al mejor servidor de discord',
81
81
  x: 590,
82
- y: 500,
83
- font_size: 30,
82
+ y: 450,
83
+ font_size: 35,
84
84
  text_color: "#F7F7F7"
85
85
  }
86
86
  }
@@ -291,7 +291,7 @@ class Welcome {
291
291
  /**
292
292
  * Establece el fondo de la imagen de bienvenida (color o imagen)
293
293
  * @param {'color'|'image'} type - Tipo de fondo ('color' o 'image')
294
- * @param {string|Buffer} data - Color hexadecimal (ej. '#FF5733') o imagen (URL/Buffer)
294
+ * @param {string|Buffer} value - Color hexadecimal (ej. '#FF5733') o imagen (URL/Buffer)
295
295
  * @returns {Welcome}
296
296
  * @throws {NekoError} Si los parámetros son inválidos
297
297
  * @example
@@ -305,36 +305,36 @@ class Welcome {
305
305
  * const imageBuffer = fs.readFileSync('fondo.jpg');
306
306
  * welcome.setBackground('image', imageBuffer);
307
307
  */
308
- setBackground(type, data) {
308
+ setBackground(type, value) {
309
309
  if (!type) throw new NekoError('BackgroundError', 'El parámetro <type> no puede estar vacío');
310
310
  if (typeof type != 'string') throw new NekoError('TypeError', `El parámetro <type> debe ser string, recibió ${typeof type}`);
311
311
  if (!['color', 'image'].includes(type)) throw new NekoError('BackgroundError', 'El tipo de fondo debe ser "color" o "image"');
312
312
 
313
- if (!data) throw new NekoError('BackgroundError', 'El parámetro <data> no puede estar vacío');
313
+ if (!value) throw new NekoError('BackgroundError', 'El parámetro <value> no puede estar vacío');
314
314
 
315
315
  if (type == 'color') {
316
- if (typeof data != 'string') throw new NekoError('TypeError', 'Para fondo de color, <data> debe ser string');
317
- if (!data.startsWith('#')) throw new NekoError('BackgroundError', 'El color debe comenzar con \'#\'');
318
- if (!hex_reg.test(data)) throw new NekoError('BackgroundError', 'El valor no es un color hexadecimal válido');
316
+ if (typeof value != 'string') throw new NekoError('TypeError', 'Para fondo de color, <data> debe ser string');
317
+ if (!value.startsWith('#')) throw new NekoError('BackgroundError', 'El color debe comenzar con \'#\'');
318
+ if (!hex_reg.test(value)) throw new NekoError('BackgroundError', 'El valor no es un color hexadecimal válido');
319
319
 
320
- this.data.background = { type, data };
320
+ this.data.background = { type, value };
321
321
  return this;
322
322
  }
323
323
 
324
324
  if (type == 'image') {
325
- if (typeof data != 'string' && !Buffer.isBuffer(data)) {
326
- throw new NekoError('TypeError', 'Para fondo de imagen, <data> debe ser URL (string) o Buffer');
325
+ if (typeof value != 'string' && !Buffer.isBuffer(value)) {
326
+ throw new NekoError('TypeError', 'Para fondo de imagen, <value> debe ser URL (string) o Buffer');
327
327
  }
328
328
 
329
- if (typeof data == 'string') {
329
+ if (typeof value == 'string') {
330
330
  try {
331
- new URL(data);
331
+ new URL(value);
332
332
  } catch (error) {
333
333
  throw new NekoError('BackgroundError', 'La URL proporcionada no es válida');
334
334
  }
335
335
  }
336
336
 
337
- this.data.background = { type, data };
337
+ this.data.background = { type, value };
338
338
  return this;
339
339
  }
340
340
  }
@@ -216,10 +216,10 @@ export class Welcome {
216
216
  /**
217
217
  * Establece el fondo de la imagen (color o imagen)
218
218
  * @param type Tipo de fondo ('color' o 'image')
219
- * @param data Color hexadecimal o imagen (URL/Buffer)
219
+ * @param value Color hexadecimal o imagen (URL/Buffer)
220
220
  * @throws {NekoError} Si los parámetros son inválidos
221
221
  */
222
- setBackground(type: 'color' | 'image', data: string | Buffer): this;
222
+ setBackground(type: 'color' | 'image', value: string | Buffer): this;
223
223
 
224
224
  /**
225
225
  * Establece el avatar y su configuración
File without changes
File without changes
File without changes
File without changes
File without changes