xernerx 2.1.2 → 2.1.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.
package/models/Client.js CHANGED
@@ -34,14 +34,14 @@ class Client extends Discord.Client {
34
34
  clientPermissions: s.array(s.string).optional
35
35
  }).parse(options)
36
36
 
37
- this.client = new Discord.Client({ intents: [options.intents], partials: [options.partials] });
37
+ this.client = new Discord.Client({ intents: [options.intents || 0], partials: [options.partials] });
38
38
 
39
39
  this.client.settings = {
40
- prefix: options.prefix,
40
+ prefix: options.prefix || [],
41
41
 
42
- ownerId: options.ownerId,
42
+ ownerId: options.ownerId || [],
43
43
 
44
- guildId: options.guildId,
44
+ guildId: options.guildId || undefined,
45
45
 
46
46
  global: options.global || false,
47
47
 
@@ -109,7 +109,7 @@ class CommandHandler {
109
109
  if (type === "interaction commands" && client.settings.logging) console.log(logStyle(`${client.user.tag} is online in ${(await client.guilds.fetch()).size} servers.`, "text", "cyan"));
110
110
 
111
111
  try {
112
- if (client.global == true) {
112
+ if (client.settings.global == true) {
113
113
  if (logging || this.client.settings.logging) console.info(logStyle(`Loaded ${type} in ${(await client.guilds.fetch()).size} server(s) globally.`, 'text', 'purple'));
114
114
  rest.put(Routes.applicationCommands(client.user.id), {
115
115
  body: this.commands
@@ -35,7 +35,7 @@ class EventHandler {
35
35
  }
36
36
  }
37
37
 
38
- if (logging || this.client.logging) console.info(logStyle(`Loaded events: ${events.join(', ')}`, 'text', 'purple'));
38
+ if (logging || this.client.settings.logging) console.info(logStyle(`Loaded events: ${events.join(', ')}`, 'text', 'purple'));
39
39
 
40
40
  const builderFiles = fs.readdirSync(`${__dirname}/../events`).filter(file => file.endsWith('.js'))
41
41
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xernerx",
3
- "version": "2.1.2",
3
+ "version": "2.1.5",
4
4
  "description": "A bot framework for discord.js. [BETA]",
5
5
  "main": "main.js",
6
6
  "scripts": {