catto.js 0.1.7 → 0.1.9

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/Bot.js CHANGED
@@ -151,7 +151,7 @@ module.exports = class extends EventEmitter {
151
151
  var button = this.buttons.get(interaction.customId);
152
152
  if (button) {
153
153
  try {
154
- button.execute({
154
+ button({
155
155
  Discord,
156
156
  User,
157
157
  MessageBuilder,
package/MessageBuilder.js CHANGED
@@ -5,10 +5,16 @@ module.exports = class MessageBuilder {
5
5
  this.data = {};
6
6
  }
7
7
  text(t) {
8
+ if (!this.data.content) {
9
+ this.data.content = "";
10
+ }
8
11
  this.data.content += t;
9
12
  return this;
10
13
  }
11
14
  link(text, link) {
15
+ if (!this.data.content) {
16
+ this.data.content = "";
17
+ }
12
18
  this.data.content += `[${text}](${link})`;
13
19
  return this;
14
20
  }
@@ -18,7 +24,11 @@ module.exports = class MessageBuilder {
18
24
  throw new Error("All buttons except URL must have ID.");
19
25
  }
20
26
  btn.setCustomId(basic.id);
21
- btn.setDisabled(basic.disabled);
27
+ if (basic.disabled) {
28
+ btn.setDisabled(!0);
29
+ } else {
30
+ btn.setDisabled(!1);
31
+ }
22
32
  if (basic.emoji) {
23
33
  btn.setEmoji(basic.emoji);
24
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catto.js",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Universal module for everything.",
5
5
  "main": "index.js",
6
6
  "scripts": {