xernerx 2.7.4 → 2.7.5

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.
@@ -1,7 +1,6 @@
1
1
  const colors = require('../data/colors.json');
2
2
  const { EmbedBuilder, ActionRowBuilder, SelectMenuBuilder, Embed, ButtonBuilder, ButtonStyle } = require('discord.js');
3
3
  const opts = require('../data/options.json');
4
- const { logStyle } = require('dumfunctions');
5
4
 
6
5
  function reply(interaction, text) {
7
6
  return (interaction.replied || interaction.deferred) ? interaction.editReply(text) : interaction.reply(text);
@@ -12,7 +11,6 @@ function reply(interaction, text) {
12
11
  */
13
12
  module.exports = new class Functions {
14
13
  /**
15
- *
16
14
  * @param {object} client - Client object.
17
15
  * @param {object} options - Client options.
18
16
  * @returns an object of default colors and custom colors to be imported anywhere without having to import them.
@@ -85,6 +83,8 @@ module.exports = new class Functions {
85
83
  (async () => {
86
84
  let embed = options.index;
87
85
 
86
+ if (!options.components) options.components = [];
87
+
88
88
  let m = options.send ? await interaction.channel.send({ embeds: [embed], components: [options.row, ...options.components] }) : await reply(interaction, { embeds: [embed], components: [options.row, ...options.components] })
89
89
 
90
90
  interaction.channel.createMessageComponentCollector({ filter: options.filter, time: options.time || 300000 })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xernerx",
3
- "version": "2.7.4",
3
+ "version": "2.7.5",
4
4
  "description": "A bot framework for discord.js. [BETA]",
5
5
  "main": "main.js",
6
6
  "scripts": {