xernerx 4.4.17 → 4.4.19

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 (72) hide show
  1. package/dist/build/ContextCommandBuilder.d.ts +23 -31
  2. package/dist/build/ContextCommandBuilder.js +39 -39
  3. package/dist/build/EventBuilder.d.ts +1 -1
  4. package/dist/build/EventBuilder.js +2 -2
  5. package/dist/build/InhibitorBuilder.d.ts +2 -11
  6. package/dist/build/InhibitorBuilder.js +2 -2
  7. package/dist/build/MessageCommandBuilder.d.ts +20 -26
  8. package/dist/build/MessageCommandBuilder.js +34 -34
  9. package/dist/build/SlashCommandBuilder.d.ts +25 -39
  10. package/dist/build/SlashCommandBuilder.js +48 -48
  11. package/dist/client/XernerxClient.d.ts +22 -30
  12. package/dist/client/XernerxClient.js +33 -33
  13. package/dist/client/XernerxShardClient.d.ts +1 -1
  14. package/dist/client/XernerxShardClient.js +13 -15
  15. package/dist/functions/delay.d.ts +1 -1
  16. package/dist/functions/delay.js +1 -1
  17. package/dist/functions/deploy.d.ts +1 -1
  18. package/dist/functions/deploy.js +20 -15
  19. package/dist/functions/isOwner.d.ts +1 -1
  20. package/dist/functions/isOwner.js +1 -1
  21. package/dist/functions/isVoter.d.ts +1 -1
  22. package/dist/functions/isVoter.js +1 -1
  23. package/dist/functions/load.d.ts +1 -1
  24. package/dist/functions/load.js +3 -2
  25. package/dist/functions/reload.d.ts +1 -1
  26. package/dist/functions/reload.js +12 -9
  27. package/dist/functions/sendWebhook.d.ts +1 -1
  28. package/dist/functions/sendWebhook.js +3 -2
  29. package/dist/functions/setPresence.d.ts +2 -2
  30. package/dist/functions/setPresence.js +11 -12
  31. package/dist/functions/xernerxUser.d.ts +1 -1
  32. package/dist/functions/xernerxUser.js +1 -1
  33. package/dist/handlers/CommandHandler.d.ts +1 -1
  34. package/dist/handlers/CommandHandler.js +110 -87
  35. package/dist/handlers/CommandHandler.js.map +1 -1
  36. package/dist/handlers/EventHandler.d.ts +1 -1
  37. package/dist/handlers/EventHandler.js +3 -3
  38. package/dist/handlers/ExtensionHandler.d.ts +1 -1
  39. package/dist/handlers/ExtensionHandler.js +5 -3
  40. package/dist/handlers/Handler.d.ts +1 -1
  41. package/dist/handlers/Handler.js +16 -6
  42. package/dist/handlers/InhibitorHandler.d.ts +1 -1
  43. package/dist/handlers/InhibitorHandler.js +3 -3
  44. package/dist/handlers/WebhookHandler.d.ts +4 -2
  45. package/dist/handlers/WebhookHandler.js +6 -9
  46. package/dist/main.d.ts +22 -29
  47. package/dist/main.js +22 -29
  48. package/dist/models/Arguments.d.ts +2 -5
  49. package/dist/models/Arguments.js +63 -48
  50. package/dist/tools/XernerxError.d.ts +1 -1
  51. package/dist/tools/XernerxError.js +1 -1
  52. package/dist/tools/XernerxLog.d.ts +1 -1
  53. package/dist/tools/XernerxLog.js +2 -7
  54. package/dist/types/extenders.d.ts +9 -5
  55. package/dist/types/extenders.js +1 -1
  56. package/dist/types/interfaces.d.ts +6 -9
  57. package/dist/types/interfaces.js +1 -1
  58. package/dist/types/types.d.ts +7 -179
  59. package/dist/types/types.js +1 -1
  60. package/dist/utils/ClientUtil.d.ts +4 -4
  61. package/dist/utils/ClientUtil.js +14 -8
  62. package/dist/utils/InteractionUtil.d.ts +2 -2
  63. package/dist/utils/InteractionUtil.js +1 -1
  64. package/dist/utils/MessageUtil.d.ts +2 -2
  65. package/dist/utils/MessageUtil.js +9 -5
  66. package/dist/utils/Util.d.ts +1 -1
  67. package/dist/utils/Util.js +1 -1
  68. package/dist/validators/commandValidation.d.ts +2 -5
  69. package/dist/validators/commandValidation.js +29 -19
  70. package/dist/validators/inhibitorValidations.d.ts +3 -19
  71. package/dist/validators/inhibitorValidations.js +2 -2
  72. package/package.json +1 -1
package/dist/main.d.ts CHANGED
@@ -15,32 +15,25 @@ export * from './types/interfaces.js';
15
15
  import Discord from 'discord.js';
16
16
  declare const version: any;
17
17
  export default XernerxClient;
18
- export {
19
- /**
20
- ** Clients
21
- */
22
- XernerxClient,
23
- XernerxShardClient,
24
- /**
25
- ** Builders
26
- */
27
- MessageCommandBuilder,
28
- SlashCommandBuilder,
29
- ContextCommandBuilder,
30
- EventBuilder,
31
- InhibitorBuilder,
32
- ExtensionBuilder,
33
- /**
34
- ** Imported exports
35
- */
36
- Discord,
37
- /**
38
- ** Properties
39
- */
40
- version,
41
- /**
42
- ** Tools
43
- */
44
- XernerxLog,
45
- };
46
- //# sourceMappingURL=main.d.ts.map
18
+ export {
19
+ /**
20
+ ** Clients
21
+ */
22
+ XernerxClient, XernerxShardClient,
23
+ /**
24
+ ** Builders
25
+ */
26
+ MessageCommandBuilder, SlashCommandBuilder, ContextCommandBuilder, EventBuilder, InhibitorBuilder, ExtensionBuilder,
27
+ /**
28
+ ** Imported exports
29
+ */
30
+ Discord,
31
+ /**
32
+ ** Properties
33
+ */
34
+ version,
35
+ /**
36
+ ** Tools
37
+ */
38
+ XernerxLog, };
39
+ //# sourceMappingURL=main.d.ts.map
package/dist/main.js CHANGED
@@ -16,32 +16,25 @@ export * from './types/interfaces.js';
16
16
  import Discord from 'discord.js';
17
17
  const version = JSON.parse(fs.readFileSync('node_modules/xernerx/package.json', 'utf-8')).version;
18
18
  export default XernerxClient;
19
- export {
20
- /**
21
- ** Clients
22
- */
23
- XernerxClient,
24
- XernerxShardClient,
25
- /**
26
- ** Builders
27
- */
28
- MessageCommandBuilder,
29
- SlashCommandBuilder,
30
- ContextCommandBuilder,
31
- EventBuilder,
32
- InhibitorBuilder,
33
- ExtensionBuilder,
34
- /**
35
- ** Imported exports
36
- */
37
- Discord,
38
- /**
39
- ** Properties
40
- */
41
- version,
42
- /**
43
- ** Tools
44
- */
45
- XernerxLog,
46
- };
47
- //# sourceMappingURL=main.js.map
19
+ export {
20
+ /**
21
+ ** Clients
22
+ */
23
+ XernerxClient, XernerxShardClient,
24
+ /**
25
+ ** Builders
26
+ */
27
+ MessageCommandBuilder, SlashCommandBuilder, ContextCommandBuilder, EventBuilder, InhibitorBuilder, ExtensionBuilder,
28
+ /**
29
+ ** Imported exports
30
+ */
31
+ Discord,
32
+ /**
33
+ ** Properties
34
+ */
35
+ version,
36
+ /**
37
+ ** Tools
38
+ */
39
+ XernerxLog, };
40
+ //# sourceMappingURL=main.js.map
@@ -5,8 +5,5 @@ import { XernerxMessage, XernerxMessageContextInteraction, XernerxSlashInteracti
5
5
  import { MessageCommandArguments } from '../types/interfaces.js';
6
6
  import { XernerxInteraction } from '../types/types.js';
7
7
  export declare function messageArguments(message: XernerxMessage, command: MessageCommandBuilder): Promise<MessageCommandArguments>;
8
- export declare function interactionArguments(
9
- interaction: XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction> | any,
10
- command: ContextCommandBuilder | SlashCommandBuilder
11
- ): Promise<any>;
12
- //# sourceMappingURL=Arguments.d.ts.map
8
+ export declare function interactionArguments(interaction: XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction> | any, command: ContextCommandBuilder | SlashCommandBuilder): Promise<any>;
9
+ //# sourceMappingURL=Arguments.d.ts.map
@@ -1,35 +1,45 @@
1
1
  export async function messageArguments(message, command) {
2
- const separator = command.separator || ' ',
3
- content = message.content.split(separator).slice(1);
4
- let args = {},
5
- flags = {};
2
+ const separator = command.separator || ' ', content = message.content.split(separator).slice(1);
3
+ let args = {}, flags = {};
6
4
  if (command.flags)
7
5
  command.flags.map((flag) => {
8
- if (!flags) flags = {};
9
- if (content.includes(flag.match)) flags[flag.name] = true;
10
- else flags[flag.name] = false;
6
+ if (!flags)
7
+ flags = {};
8
+ if (content.includes(flag.match))
9
+ flags[flag.name] = true;
10
+ else
11
+ flags[flag.name] = false;
11
12
  const index = content.indexOf(flag.match);
12
- if (index > 0) content.splice(index, 1);
13
+ if (index > 0)
14
+ content.splice(index, 1);
13
15
  });
14
16
  if (command.args)
15
17
  for (const argument of command.args) {
16
18
  const element = content.at(0) || null;
17
19
  if (!element) {
18
- if (typeof argument.default === 'function') args[argument.name] = argument.default(message);
20
+ if (typeof argument.default === 'function')
21
+ args[argument.name] = argument.default(message);
19
22
  args[argument.name] = argument.default || null;
20
23
  continue;
21
24
  }
22
- if (argument.type === 'option') argument.match?.includes(element) ? (args[argument.name] = element) : (args[argument.name] = null);
23
- if (argument.type === 'number') args[argument.name] = parseInt(element);
24
- if (argument.type === 'integer') args[argument.name] = parseInt(element);
25
- if (argument.type === 'boolean') args[argument.name] = element === 'true' ? true : false;
26
- if (argument.type === 'confirm') args[argument.name] = element === 'yes' ? 'yes' : 'no';
27
- if (argument.type === 'string') args[argument.name] = element;
25
+ if (argument.type === 'option')
26
+ argument.match?.includes(element) ? (args[argument.name] = element) : (args[argument.name] = null);
27
+ if (argument.type === 'number')
28
+ args[argument.name] = parseInt(element);
29
+ if (argument.type === 'integer')
30
+ args[argument.name] = parseInt(element);
31
+ if (argument.type === 'boolean')
32
+ args[argument.name] = element === 'true' ? true : false;
33
+ if (argument.type === 'confirm')
34
+ args[argument.name] = element === 'yes' ? 'yes' : 'no';
35
+ if (argument.type === 'string')
36
+ args[argument.name] = element;
28
37
  if (argument.type === 'channel') {
29
38
  try {
30
39
  const channel = await message.client.channels.fetch(element);
31
40
  args[argument.name] = channel;
32
- } catch (e) {
41
+ }
42
+ catch (e) {
33
43
  args[argument.name] = null;
34
44
  }
35
45
  }
@@ -37,33 +47,32 @@ export async function messageArguments(message, command) {
37
47
  try {
38
48
  const guild = await message.client.guilds.fetch(element);
39
49
  args[argument.name] = guild;
40
- } catch (e) {
50
+ }
51
+ catch (e) {
41
52
  args[argument.name] = null;
42
53
  }
43
54
  }
44
55
  if (argument.type === 'mentionable') {
45
- (
46
- await Promise.all(
47
- [message.guild?.roles, message.client.users, message.client.guilds, message.client.channels, message.guild?.members, message.channel.messages].map((req) =>
48
- req
49
- ? req
50
- .fetch(element)
51
- .then((r) => r)
52
- .catch(() => null)
53
- : null
54
- )
55
- )
56
- ).map((mentionable) => {
57
- if (!args) args = {};
58
- if (mentionable) return (args[argument.name] = mentionable);
59
- else return (args[argument.name] = null);
56
+ (await Promise.all([message.guild?.roles, message.client.users, message.client.guilds, message.client.channels, message.guild?.members, message.channel.messages].map((req) => req
57
+ ? req
58
+ .fetch(element)
59
+ .then((r) => r)
60
+ .catch(() => null)
61
+ : null))).map((mentionable) => {
62
+ if (!args)
63
+ args = {};
64
+ if (mentionable)
65
+ return (args[argument.name] = mentionable);
66
+ else
67
+ return (args[argument.name] = null);
60
68
  });
61
69
  }
62
70
  if (argument.type === 'role') {
63
71
  try {
64
72
  const role = await message.guild?.roles.fetch(element);
65
73
  args[argument.name] = role;
66
- } catch (e) {
74
+ }
75
+ catch (e) {
67
76
  args[argument.name] = null;
68
77
  }
69
78
  }
@@ -71,7 +80,8 @@ export async function messageArguments(message, command) {
71
80
  try {
72
81
  const user = await message.client.users.fetch(element);
73
82
  args[argument.name] = user;
74
- } catch (e) {
83
+ }
84
+ catch (e) {
75
85
  args[argument.name] = null;
76
86
  }
77
87
  }
@@ -79,7 +89,8 @@ export async function messageArguments(message, command) {
79
89
  try {
80
90
  const member = await message.guild?.members.fetch(element);
81
91
  args[argument.name] = member;
82
- } catch (e) {
92
+ }
93
+ catch (e) {
83
94
  args[argument.name] = null;
84
95
  }
85
96
  }
@@ -87,18 +98,20 @@ export async function messageArguments(message, command) {
87
98
  try {
88
99
  const msg = await message.channel?.messages.fetch(element);
89
100
  args[argument.name] = msg;
90
- } catch (e) {
101
+ }
102
+ catch (e) {
91
103
  args[argument.name] = null;
92
104
  }
93
105
  }
94
106
  if (argument.type === 'list') {
95
107
  let separator = String(argument.separator) || ',';
96
- if (separator.startsWith('/') && separator.endsWith('/')) separator = separator.replace(/^\/|\/$/gim, '');
108
+ if (separator.startsWith('/') && separator.endsWith('/'))
109
+ separator = separator.replace(/^\/|\/$/gim, '');
97
110
  const items = content.join(' ').split(new RegExp(' *' + separator + ' *', 'gi'));
98
- if (!argument.content) args[argument.name] = items;
111
+ if (!argument.content)
112
+ args[argument.name] = items;
99
113
  else {
100
- const contents = argument.content.map((content) => content.toLowerCase()),
101
- itemList = [];
114
+ const contents = argument.content.map((content) => content.toLowerCase()), itemList = [];
102
115
  items.map((item) => (contents.includes(item.toLowerCase()) ? itemList.push(argument.content?.at(contents.indexOf(item.toLowerCase()))) : null));
103
116
  args[argument.name] = itemList;
104
117
  break;
@@ -110,16 +123,16 @@ export async function messageArguments(message, command) {
110
123
  }
111
124
  content.splice(0, 1);
112
125
  }
113
- if (!command.flags) flags = null;
114
- if (!command.args) args = null;
126
+ if (!command.flags)
127
+ flags = null;
128
+ if (!command.args)
129
+ args = null;
115
130
  return { args, flags };
116
131
  }
117
132
  export async function interactionArguments(interaction, command) {
118
133
  if (command.fileType === 'SlashCommand') {
119
134
  const options = {};
120
- let args = interaction?.options?._hoistedOptions,
121
- group = interaction?.options?._group,
122
- subcommand = interaction?.options?._subcommand;
135
+ let args = interaction?.options?._hoistedOptions, group = interaction?.options?._group, subcommand = interaction?.options?._subcommand;
123
136
  if (interaction.options._hoistedOptions) {
124
137
  for (const option of interaction.options._hoistedOptions) {
125
138
  options[option.name] = option.member || option.channel || option.user || option.role || option.value;
@@ -129,8 +142,10 @@ export async function interactionArguments(interaction, command) {
129
142
  return { args, group, subcommand };
130
143
  }
131
144
  if (command.fileType === 'ContextCommand') {
132
- if (command.type === 'user') return await interaction.client.users.fetch(interaction.targetId);
133
- if (command.type === 'message') return await interaction.channel.messages.fetch(interaction.targetId);
145
+ if (command.type === 'user')
146
+ return await interaction.client.users.fetch(interaction.targetId);
147
+ if (command.type === 'message')
148
+ return await interaction.channel.messages.fetch(interaction.targetId);
134
149
  }
135
150
  }
136
- //# sourceMappingURL=Arguments.js.map
151
+ //# sourceMappingURL=Arguments.js.map
@@ -4,4 +4,4 @@ export default class XernerxError {
4
4
  stack: {} | undefined;
5
5
  constructor(message?: string, error?: Error | unknown);
6
6
  }
7
- //# sourceMappingURL=XernerxError.d.ts.map
7
+ //# sourceMappingURL=XernerxError.d.ts.map
@@ -8,4 +8,4 @@ export default class XernerxError {
8
8
  this.stack = error || new Error().stack;
9
9
  }
10
10
  }
11
- //# sourceMappingURL=XernerxError.js.map
11
+ //# sourceMappingURL=XernerxError.js.map
@@ -12,4 +12,4 @@ export default class XernerxLog {
12
12
  error(message: string, error?: XernerxError | unknown): void | null;
13
13
  ready(): void;
14
14
  }
15
- //# sourceMappingURL=XernerxLog.d.ts.map
15
+ //# sourceMappingURL=XernerxLog.d.ts.map
@@ -18,12 +18,7 @@ export default class XernerxLog {
18
18
  }
19
19
  ready() {
20
20
  this.client.prependOnceListener('ready', async (synced) => {
21
- this.info(
22
- `${synced.user.tag} is now online, watching ${this.client.guilds.cache.size} guilds, using ${
23
- this.client.settings.local ? await this.client.guilds.fetch(this.client.settings.local) : 'none'
24
- } as local guild.`,
25
- this.readyLog
26
- );
21
+ this.info(`${synced.user.tag} is now online, watching ${this.client.guilds.cache.size} guilds, using ${this.client.settings.local ? await this.client.guilds.fetch(this.client.settings.local) : 'none'} as local guild.`, this.readyLog);
27
22
  const files = [];
28
23
  for (const [id, data] of this.client.commands.message) {
29
24
  files.push(data);
@@ -51,4 +46,4 @@ export default class XernerxLog {
51
46
  });
52
47
  }
53
48
  }
54
- //# sourceMappingURL=XernerxLog.js.map
49
+ //# sourceMappingURL=XernerxLog.js.map
@@ -8,10 +8,14 @@ export interface XernerxUser extends User {
8
8
  export interface XernerxMember extends GuildMember {
9
9
  username: string;
10
10
  }
11
- export interface XernerxGuild extends Guild {}
12
- export interface XernerxGuildChannel extends GuildChannel {}
13
- export interface XernerxDMChannel extends DMChannel {}
14
- interface XernerxCommand {}
11
+ export interface XernerxGuild extends Guild {
12
+ }
13
+ export interface XernerxGuildChannel extends GuildChannel {
14
+ }
15
+ export interface XernerxDMChannel extends DMChannel {
16
+ }
17
+ interface XernerxCommand {
18
+ }
15
19
  export interface XernerxMessage extends Message, XernerxCommand {
16
20
  user: XernerxUser;
17
21
  util: MessageUtil;
@@ -29,4 +33,4 @@ export interface XernerxMessageContextInteraction extends MessageContextMenuComm
29
33
  util: InteractionUtil;
30
34
  }
31
35
  export {};
32
- //# sourceMappingURL=extenders.d.ts.map
36
+ //# sourceMappingURL=extenders.d.ts.map
@@ -1,2 +1,2 @@
1
1
  export {};
2
- //# sourceMappingURL=extenders.js.map
2
+ //# sourceMappingURL=extenders.js.map
@@ -68,14 +68,11 @@ export interface DBLOptions {
68
68
  }
69
69
  export interface XernerxCache {
70
70
  messages: Collection<string, string>;
71
- cooldowns: Collection<
72
- string,
73
- {
74
- id: string;
75
- command: string;
76
- createdTimestamp: number;
77
- }
78
- >;
71
+ cooldowns: Collection<string, {
72
+ id: string;
73
+ command: string;
74
+ createdTimestamp: number;
75
+ }>;
79
76
  }
80
77
  interface CommandHandlerOptions {
81
78
  directory: string;
@@ -233,4 +230,4 @@ export interface PresenceOptions {
233
230
  }
234
231
  export type ContextCommandArguments<T extends 'user' | 'message'> = T extends 'user' ? XernerxUser : XernerxMessage;
235
232
  export {};
236
- //# sourceMappingURL=interfaces.d.ts.map
233
+ //# sourceMappingURL=interfaces.d.ts.map
@@ -1,2 +1,2 @@
1
1
  export {};
2
- //# sourceMappingURL=interfaces.js.map
2
+ //# sourceMappingURL=interfaces.js.map
@@ -1,186 +1,14 @@
1
- import {
2
- SlashCommandBooleanOption,
3
- SlashCommandChannelOption,
4
- SlashCommandIntegerOption,
5
- SlashCommandMentionableOption,
6
- SlashCommandNumberOption,
7
- SlashCommandRoleOption,
8
- SlashCommandStringOption,
9
- SlashCommandUserOption,
10
- } from 'discord.js';
1
+ import { SlashCommandBooleanOption, SlashCommandChannelOption, SlashCommandIntegerOption, SlashCommandMentionableOption, SlashCommandNumberOption, SlashCommandRoleOption, SlashCommandStringOption, SlashCommandUserOption } from 'discord.js';
11
2
  import { XernerxMessageContextInteraction, XernerxSlashInteraction, XernerxUserContextInteraction } from './extenders.js';
12
3
  export type FileType = 'MessageCommand' | 'SlashCommand' | 'ContextCommand' | 'Event' | 'Inhibitor';
13
- export type Locales =
14
- | 'en-US'
15
- | 'en-GB'
16
- | 'bg'
17
- | 'zh-CN'
18
- | 'zh-TW'
19
- | 'hr'
20
- | 'cs'
21
- | 'da'
22
- | 'nl'
23
- | 'fi'
24
- | 'fr'
25
- | 'de'
26
- | 'el'
27
- | 'hi'
28
- | 'hu'
29
- | 'it'
30
- | 'ja'
31
- | 'ko'
32
- | 'lt'
33
- | 'no'
34
- | 'pl'
35
- | 'pt-BR'
36
- | 'ro'
37
- | 'ru'
38
- | 'es-ES'
39
- | 'sv-SE'
40
- | 'th'
41
- | 'tr'
42
- | 'uk'
43
- | 'vi';
4
+ export type Locales = 'en-US' | 'en-GB' | 'bg' | 'zh-CN' | 'zh-TW' | 'hr' | 'cs' | 'da' | 'nl' | 'fi' | 'fr' | 'de' | 'el' | 'hi' | 'hu' | 'it' | 'ja' | 'ko' | 'lt' | 'no' | 'pl' | 'pt-BR' | 'ro' | 'ru' | 'es-ES' | 'sv-SE' | 'th' | 'tr' | 'uk' | 'vi';
44
5
  export type SlashCommandArgumentType = 'attachment' | 'boolean' | 'channel' | 'integer' | 'mentionable' | 'number' | 'role' | 'string' | 'user';
45
6
  export type SlashCommandOptionChoices = SlashCommandStringOption | SlashCommandNumberOption | SlashCommandIntegerOption;
46
7
  export type SlashCommandOption = SlashCommandOptionChoices | SlashCommandBooleanOption | SlashCommandUserOption | SlashCommandChannelOption | SlashCommandRoleOption | SlashCommandMentionableOption;
47
- export type MessageCommandArgumentType =
48
- | 'string'
49
- | 'number'
50
- | 'boolean'
51
- | 'confirm'
52
- | 'channel'
53
- | 'guild'
54
- | 'integer'
55
- | 'mentionable'
56
- | 'role'
57
- | 'user'
58
- | 'message'
59
- | 'member'
60
- | 'list'
61
- | 'option'
62
- | 'rest';
63
- export type DiscordEventType =
64
- | 'applicationCommandPermissionsUpdate'
65
- | 'autoModerationActionExecution'
66
- | 'autoModerationRuleCreate'
67
- | 'autoModerationRuleDelete'
68
- | 'autoModerationRuleUpdate'
69
- | 'ready'
70
- | 'guildCreate'
71
- | 'guildDelete'
72
- | 'guildUpdate'
73
- | 'guildUnavailable'
74
- | 'guildMemberAdd'
75
- | 'guildMemberRemove'
76
- | 'guildMemberUpdate'
77
- | 'guildMemberAvailable'
78
- | 'guildMembersChunk'
79
- | 'guildIntegrationsUpdate'
80
- | 'roleCreate'
81
- | 'roleDelete'
82
- | 'inviteCreate'
83
- | 'inviteDelete'
84
- | 'roleUpdate'
85
- | 'emojiCreate'
86
- | 'emojiDelete'
87
- | 'emojiUpdate'
88
- | 'guildBanAdd'
89
- | 'guildBanRemove'
90
- | 'channelCreate'
91
- | 'channelDelete'
92
- | 'channelUpdate'
93
- | 'channelPinsUpdate'
94
- | 'messageCreate'
95
- | 'messageDelete'
96
- | 'messageUpdate'
97
- | 'messageDeleteBulk'
98
- | 'messageReactionAdd'
99
- | 'messageReactionRemove'
100
- | 'messageReactionRemoveAll'
101
- | 'messageReactionRemoveEmoji'
102
- | 'threadCreate'
103
- | 'threadDelete'
104
- | 'threadUpdate'
105
- | 'threadListSync'
106
- | 'threadMemberUpdate'
107
- | 'threadMembersUpdate'
108
- | 'userUpdate'
109
- | 'presenceUpdate'
110
- | 'voiceServerUpdate'
111
- | 'voiceStateUpdate'
112
- | 'typingStart'
113
- | 'webhookUpdate'
114
- | 'interactionCreate'
115
- | 'error'
116
- | 'warn'
117
- | 'debug'
118
- | 'cacheSweep'
119
- | 'shardDisconnect'
120
- | 'shardError'
121
- | 'shardReconnecting'
122
- | 'shardReady'
123
- | 'shardResume'
124
- | 'invalidated'
125
- | 'raw'
126
- | 'stageInstanceCreate'
127
- | 'stageInstanceUpdate'
128
- | 'stageInstanceDelete'
129
- | 'stickerCreate'
130
- | 'stickerDelete'
131
- | 'stickerUpdate'
132
- | 'guildScheduledEventCreate'
133
- | 'guildScheduledEventUpdate'
134
- | 'guildScheduledEventDelete'
135
- | 'guildScheduledEventUserAdd'
136
- | 'guildScheduledEventUserRemove';
8
+ export type MessageCommandArgumentType = 'string' | 'number' | 'boolean' | 'confirm' | 'channel' | 'guild' | 'integer' | 'mentionable' | 'role' | 'user' | 'message' | 'member' | 'list' | 'option' | 'rest';
9
+ export type DiscordEventType = 'applicationCommandPermissionsUpdate' | 'autoModerationActionExecution' | 'autoModerationRuleCreate' | 'autoModerationRuleDelete' | 'autoModerationRuleUpdate' | 'ready' | 'guildCreate' | 'guildDelete' | 'guildUpdate' | 'guildUnavailable' | 'guildMemberAdd' | 'guildMemberRemove' | 'guildMemberUpdate' | 'guildMemberAvailable' | 'guildMembersChunk' | 'guildIntegrationsUpdate' | 'roleCreate' | 'roleDelete' | 'inviteCreate' | 'inviteDelete' | 'roleUpdate' | 'emojiCreate' | 'emojiDelete' | 'emojiUpdate' | 'guildBanAdd' | 'guildBanRemove' | 'channelCreate' | 'channelDelete' | 'channelUpdate' | 'channelPinsUpdate' | 'messageCreate' | 'messageDelete' | 'messageUpdate' | 'messageDeleteBulk' | 'messageReactionAdd' | 'messageReactionRemove' | 'messageReactionRemoveAll' | 'messageReactionRemoveEmoji' | 'threadCreate' | 'threadDelete' | 'threadUpdate' | 'threadListSync' | 'threadMemberUpdate' | 'threadMembersUpdate' | 'userUpdate' | 'presenceUpdate' | 'voiceServerUpdate' | 'voiceStateUpdate' | 'typingStart' | 'webhookUpdate' | 'interactionCreate' | 'error' | 'warn' | 'debug' | 'cacheSweep' | 'shardDisconnect' | 'shardError' | 'shardReconnecting' | 'shardReady' | 'shardResume' | 'invalidated' | 'raw' | 'stageInstanceCreate' | 'stageInstanceUpdate' | 'stageInstanceDelete' | 'stickerCreate' | 'stickerDelete' | 'stickerUpdate' | 'guildScheduledEventCreate' | 'guildScheduledEventUpdate' | 'guildScheduledEventDelete' | 'guildScheduledEventUserAdd' | 'guildScheduledEventUserRemove';
137
10
  export type EventType = DiscordEventType | 'webhookCreate' | 'webhookError' | 'commandBlock' | 'commandError' | 'commandStart' | 'commandFinish' | 'commandCooldown';
138
- export type XernerxInteraction<T extends XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction> = T extends XernerxSlashInteraction
139
- ? XernerxSlashInteraction
140
- : T extends XernerxUserContextInteraction
141
- ? XernerxUserContextInteraction
142
- : XernerxMessageContextInteraction;
143
- export type PermissionNames =
144
- | 'create instant invite'
145
- | 'kick members'
146
- | 'ban members'
147
- | 'administrator'
148
- | 'manage channels'
149
- | 'manage guild'
150
- | 'add reactions'
151
- | 'view audit log'
152
- | 'priority speaker'
153
- | 'stream'
154
- | 'view channel'
155
- | 'send messages'
156
- | 'send tts messages'
157
- | 'manage messages'
158
- | 'embed links'
159
- | 'attach files'
160
- | 'read message history'
161
- | 'mention everyone'
162
- | 'use external emojis'
163
- | 'view guild insights'
164
- | 'connect'
165
- | 'speak'
166
- | 'mute members'
167
- | 'deafen members'
168
- | 'move members'
169
- | 'use vad'
170
- | 'change nickname'
171
- | 'manage nicknames'
172
- | 'manage roles'
173
- | 'manage webhooks'
174
- | 'manage emojis and stickers'
175
- | 'use application commands'
176
- | 'request to speak'
177
- | 'manage events'
178
- | 'manage threads'
179
- | 'create public threads'
180
- | 'create private threads'
181
- | 'use external stickers'
182
- | 'send messages in threads'
183
- | 'start embedded activities'
184
- | 'moderate members';
11
+ export type XernerxInteraction<T extends XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction> = T extends XernerxSlashInteraction ? XernerxSlashInteraction : T extends XernerxUserContextInteraction ? XernerxUserContextInteraction : XernerxMessageContextInteraction;
12
+ export type PermissionNames = 'create instant invite' | 'kick members' | 'ban members' | 'administrator' | 'manage channels' | 'manage guild' | 'add reactions' | 'view audit log' | 'priority speaker' | 'stream' | 'view channel' | 'send messages' | 'send tts messages' | 'manage messages' | 'embed links' | 'attach files' | 'read message history' | 'mention everyone' | 'use external emojis' | 'view guild insights' | 'connect' | 'speak' | 'mute members' | 'deafen members' | 'move members' | 'use vad' | 'change nickname' | 'manage nicknames' | 'manage roles' | 'manage webhooks' | 'manage emojis and stickers' | 'use application commands' | 'request to speak' | 'manage events' | 'manage threads' | 'create public threads' | 'create private threads' | 'use external stickers' | 'send messages in threads' | 'start embedded activities' | 'moderate members';
185
13
  export type InhibitorType = 'message' | 'interaction' | 'command' | 'channel' | 'user' | 'member' | 'guild' | 'contextCommand' | 'messageCommand' | 'slashCommand';
186
- //# sourceMappingURL=types.d.ts.map
14
+ //# sourceMappingURL=types.d.ts.map
@@ -1,2 +1,2 @@
1
1
  export {};
2
- //# sourceMappingURL=types.js.map
2
+ //# sourceMappingURL=types.js.map
@@ -4,8 +4,8 @@ import Util from './Util.js';
4
4
  export default class ClientUtil extends Util {
5
5
  hasVoted?: Function;
6
6
  constructor(client: XernerxClient);
7
- setPresence(options: PresenceOptions): import('discord.js').ClientPresence | undefined;
8
- resolveChannel(query: string | Record<string, string>): Promise<import('discord.js').Channel | null>;
9
- resolveGuild(query: string | Record<string, string>): Promise<import('discord.js').Guild | null>;
7
+ setPresence(options: PresenceOptions): import("discord.js").ClientPresence | undefined;
8
+ resolveChannel(query: string | Record<string, string>): Promise<import("discord.js").Channel | null>;
9
+ resolveGuild(query: string | Record<string, string>): Promise<import("discord.js").Guild | null>;
10
10
  }
11
- //# sourceMappingURL=ClientUtil.d.ts.map
11
+ //# sourceMappingURL=ClientUtil.d.ts.map