seyfert 2.1.1-dev-11420062278.0 → 2.1.1-dev-11431445625.0

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.
@@ -159,11 +159,13 @@ class Client extends base_1.BaseClient {
159
159
  break;
160
160
  case 'READY': {
161
161
  const ids = packet.d.guilds.map(x => x.id);
162
- this.__handleGuilds = this.__handleGuilds?.concat(ids) ?? ids;
162
+ if ((0, common_1.hasIntent)(this.gateway.options.intents, 'Guilds')) {
163
+ this.__handleGuilds = this.__handleGuilds?.concat(ids) ?? ids;
164
+ }
163
165
  this.botId = packet.d.user.id;
164
166
  this.applicationId = packet.d.application.id;
165
167
  this.me = transformers_1.Transformers.ClientUser(this, packet.d.user, packet.d.application);
166
- if (!this.__handleGuilds.length) {
168
+ if (!this.__handleGuilds?.length) {
167
169
  if ([...this.gateway.values()].every(shard => shard.data.session_id)) {
168
170
  await this.events?.runEvent('BOT_READY', this, this.me, -1);
169
171
  }
@@ -227,8 +227,10 @@ class WorkerClient extends base_1.BaseClient {
227
227
  return;
228
228
  shardsConnected++;
229
229
  const ids = payload.d.guilds.map(x => x.id);
230
- self.__handleGuildsResharding = self.__handleGuildsResharding?.concat(ids) ?? ids;
231
- if (shardsConnected === workerData.shards.length && !self.__handleGuildsResharding.length) {
230
+ if ((0, common_1.hasIntent)(workerData.intents, 'Guilds')) {
231
+ self.__handleGuildsResharding = self.__handleGuildsResharding?.concat(ids) ?? ids;
232
+ }
233
+ if (shardsConnected === workerData.shards.length && !self.__handleGuildsResharding?.length) {
232
234
  delete self.__handleGuildsResharding;
233
235
  self.postMessage({
234
236
  type: 'WORKER_READY_RESHARDING',
@@ -486,7 +488,9 @@ class WorkerClient extends base_1.BaseClient {
486
488
  case 'READY':
487
489
  {
488
490
  const ids = packet.d.guilds.map(x => x.id);
489
- this.__handleGuilds = this.__handleGuilds?.concat(ids) ?? ids;
491
+ if ((0, common_1.hasIntent)(this.workerData.intents, 'Guilds')) {
492
+ this.__handleGuilds = this.__handleGuilds?.concat(ids) ?? ids;
493
+ }
490
494
  this.botId = packet.d.user.id;
491
495
  this.applicationId = packet.d.application.id;
492
496
  this.me = transformers_1.Transformers.ClientUser(this, packet.d.user, packet.d.application);
@@ -42,6 +42,10 @@ export declare class ComponentContext<Type extends keyof ContextComponentCommand
42
42
  * @param ephemeral - Whether the reply should be ephemeral or not.
43
43
  */
44
44
  deferReply(ephemeral?: boolean): Promise<undefined>;
45
+ /**
46
+ * ACK an interaction and edit the original message later; the user does not see a loading state
47
+ */
48
+ deferUpdate(): Promise<undefined>;
45
49
  /**
46
50
  * Edits the response of the interaction.
47
51
  * @param body - The updated body of the response.
@@ -50,6 +50,12 @@ class ComponentContext extends basecontext_1.BaseContext {
50
50
  deferReply(ephemeral = false) {
51
51
  return this.interaction.deferReply(ephemeral ? types_1.MessageFlags.Ephemeral : undefined);
52
52
  }
53
+ /**
54
+ * ACK an interaction and edit the original message later; the user does not see a loading state
55
+ */
56
+ deferUpdate() {
57
+ return this.interaction.deferUpdate();
58
+ }
53
59
  /**
54
60
  * Edits the response of the interaction.
55
61
  * @param body - The updated body of the response.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seyfert",
3
- "version": "2.1.1-dev-11420062278.0",
3
+ "version": "2.1.1-dev-11431445625.0",
4
4
  "description": "The most advanced framework for discord bots",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",