seyfert 2.2.1-dev-13823891089.0 → 2.2.1-dev-13937969432.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.
@@ -1,6 +1,6 @@
1
1
  import { type AnonymousGuildStructure, type AutoModerationRuleStructure, type GuildMemberStructure, type GuildStructure, type StickerStructure } from '../../client/transformers';
2
2
  import type { SeyfertChannelMap } from '../../commands';
3
- import { type AllChannels, type CreateStickerBodyRequest, Guild, type GuildChannelTypes } from '../../structures';
3
+ import { type AllChannels, type CreateStickerBodyRequest, type GuildChannelTypes } from '../../structures';
4
4
  import type { GuildWidgetStyle, RESTGetAPICurrentUserGuildsQuery, RESTGetAPIGuildQuery, RESTPatchAPIAutoModerationRuleJSONBody, RESTPatchAPIChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTPatchAPIGuildJSONBody, RESTPatchAPIGuildStickerJSONBody, RESTPostAPIAutoModerationRuleJSONBody, RESTPostAPIGuildChannelJSONBody, RESTPostAPIGuildsJSONBody } from '../../types';
5
5
  import { BaseShorter } from './base';
6
6
  export declare class GuildShorter extends BaseShorter {
@@ -18,7 +18,7 @@ export declare class GuildShorter extends BaseShorter {
18
18
  * @param options.force Whether to force fetching the guild from the API even if it exists in the cache.
19
19
  * @returns A Promise that resolves to the fetched guild.
20
20
  */
21
- fetch(id: string, options?: GuildFetchOptions | boolean): Promise<Guild<"api">>;
21
+ fetch(id: string, options?: GuildFetchOptions | boolean): Promise<import("../../structures").Guild<"api">>;
22
22
  /**
23
23
  * Fetches a guild by its ID.
24
24
  * @param id The ID of the guild to fetch.
@@ -35,7 +35,7 @@ export declare class GuildShorter extends BaseShorter {
35
35
  * @returns The generated widget URL.
36
36
  */
37
37
  widgetURL(id: string, style?: GuildWidgetStyle): Promise<import("../../types").APIGuildWidgetSettings>;
38
- edit(guildId: string, body: RESTPatchAPIGuildJSONBody, reason?: string): Promise<Guild<"api">>;
38
+ edit(guildId: string, body: RESTPatchAPIGuildJSONBody, reason?: string): Promise<import("../../structures").Guild<"api">>;
39
39
  list(query?: RESTGetAPICurrentUserGuildsQuery): Promise<AnonymousGuildStructure[]>;
40
40
  fetchSelf(id: string, force?: boolean): Promise<GuildMemberStructure>;
41
41
  leave(id: string): Promise<void | undefined>;
@@ -59,7 +59,7 @@ class GuildShorter extends base_1.BaseShorter {
59
59
  const guild = await this.client.proxy.guilds(guildId).patch({ body, reason });
60
60
  if (!this.client.cache.hasGuildsIntent)
61
61
  await this.client.cache.guilds?.patch(cache_1.CacheFrom.Rest, guildId, guild);
62
- return new structures_1.Guild(this.client, guild);
62
+ return transformers_1.Transformers.Guild(this.client, guild);
63
63
  }
64
64
  list(query) {
65
65
  return this.client.proxy
@@ -27,8 +27,8 @@ export type MatchCallback = (str: string) => boolean;
27
27
  export type CollectorInteraction = ComponentInteraction | StringSelectMenuInteraction;
28
28
  export type ComponentCommands = ComponentCommand | ModalCommand;
29
29
  export interface CreateComponentCollectorResult {
30
- run<T extends CollectorInteraction = CollectorInteraction>(customId: UserMatches, callback: ComponentCallback<T>): any;
31
- stop(reason?: string): any;
30
+ run<T extends CollectorInteraction = CollectorInteraction>(customId: UserMatches, callback: ComponentCallback<T>): void;
31
+ stop(reason?: string): void;
32
32
  }
33
33
  export declare class ComponentHandler extends BaseHandler {
34
34
  protected client: UsingClient;
@@ -138,7 +138,7 @@ class Shard {
138
138
  this.debugger?.debug(`[Shard #${this.id}] Sending ${requested ? '' : 'un'}requested heartbeat (Ack=${this.heart.ack})`);
139
139
  if (!requested) {
140
140
  if (!this.heart.ack) {
141
- this.close(shared_1.ShardSocketCloseCodes.ZombiedConnection, 'Zombied connection');
141
+ this.reconnect(shared_1.ShardSocketCloseCodes.ZombiedConnection);
142
142
  return;
143
143
  }
144
144
  this.heart.ack = false;
@@ -321,6 +321,7 @@ class Shard {
321
321
  case shared_1.ShardSocketCloseCodes.Reconnect:
322
322
  case shared_1.ShardSocketCloseCodes.Resharding:
323
323
  case shared_1.ShardSocketCloseCodes.ShutdownAll:
324
+ case shared_1.ShardSocketCloseCodes.ZombiedConnection:
324
325
  //Force disconnect, ignore
325
326
  break;
326
327
  case 1000:
@@ -338,7 +339,6 @@ class Shard {
338
339
  break;
339
340
  case 1001:
340
341
  case 1006:
341
- case shared_1.ShardSocketCloseCodes.ZombiedConnection:
342
342
  case types_1.GatewayCloseCodes.UnknownError:
343
343
  case types_1.GatewayCloseCodes.DecodeError:
344
344
  case types_1.GatewayCloseCodes.NotAuthenticated:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seyfert",
3
- "version": "2.2.1-dev-13823891089.0",
3
+ "version": "2.2.1-dev-13937969432.0",
4
4
  "description": "The most advanced framework for discord bots",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",