catto.js 0.0.1 → 0.0.3

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.
Files changed (3) hide show
  1. package/User.js +5 -5
  2. package/index.js +2 -2
  3. package/package.json +1 -1
package/User.js CHANGED
@@ -31,9 +31,9 @@ module.exports = class {
31
31
  get avatar() {
32
32
  var avataru = this.avatarHash;
33
33
  if (avataru.startsWith("a_")) {
34
- avataru = `https://cdn.discordapp.com/avatars/${avataru}.gif?size=4096`;
34
+ avataru = `https://cdn.discordapp.com/avatars/${this.id}/${avataru}.gif?size=4096`;
35
35
  } else if (avataru) {
36
- avataru = `https://cdn.discordapp.com/avatars/${avataru}.webp?size=4096`;
36
+ avataru = `https://cdn.discordapp.com/avatars/${this.id}/${avataru}.webp?size=4096`;
37
37
  } else {
38
38
  avataru = `https://cdn.discordapp.com/embed/avatars/${(parseInt(this.discrim) % 5).toString()}.png`;
39
39
  }
@@ -91,9 +91,9 @@ module.exports = class {
91
91
  get banner() {
92
92
  var banneru = this.bannerHash;
93
93
  if (banneru.startsWith("a_")) {
94
- banneru = `https://cdn.discordapp.com/avatars/${banneru}.gif?size=4096`;
94
+ banneru = `https://cdn.discordapp.com/banners/${this.id}/${banneru}.gif?size=4096`;
95
95
  } else if (banneru) {
96
- banneru = `https://cdn.discordapp.com/avatars/${banneru}.webp?size=4096`;
96
+ banneru = `https://cdn.discordapp.com/banners/${this.id}/${banneru}.webp?size=4096`;
97
97
  } else {
98
98
  banneru = this.bannerColor || this.accentColor;
99
99
  }
@@ -138,4 +138,4 @@ module.exports = class {
138
138
  get isSystem() {
139
139
  return this.options.system;
140
140
  }
141
- };
141
+ };
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  var mod = {};
2
- ["random", "Server", "HTML", "request", "AuthClient", "utils", "GitHub", "Base64"].forEach(part => {
2
+ ["random", "Server", "HTML", "request", "AuthClient", "utils", "GitHub", "Base64", "User"].forEach(part => {
3
3
  mod[part] = require(`./${part}`);
4
4
  });
5
- module.exports = mod;
5
+ module.exports = mod;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catto.js",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Universal module for everything.",
5
5
  "main": "index.js",
6
6
  "scripts": {