@stoatx/client 0.4.0 → 0.6.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.
package/dist/index.d.cts CHANGED
@@ -1,5 +1,9 @@
1
1
  import { EventEmitter } from 'events';
2
+ import { APIRoutes, File, User as User$1, Member as Member$1, Channel, Message as Message$1, Role as Role$1, Invite, ServerBan as ServerBan$1, Server as Server$1, Emoji as Emoji$1, Category, Embed } from 'stoat-api';
3
+ import * as stoatApi from 'stoat-api';
4
+ export { stoatApi as API };
2
5
  import * as util from 'node:util';
6
+ import util__default from 'node:util';
3
7
 
4
8
  declare class GatewayManager {
5
9
  private client;
@@ -40,6 +44,18 @@ declare class AttachmentBuilder {
40
44
  upload(rest: RESTManager, tag: CDNTag): Promise<string>;
41
45
  }
42
46
 
47
+ type ValidPath<M extends APIRoutes["method"]> = Extract<APIRoutes, {
48
+ method: M;
49
+ }>["path"];
50
+ type RouteResponse<M extends APIRoutes["method"], P extends string> = Extract<APIRoutes, {
51
+ method: M;
52
+ path: P;
53
+ }>["response"];
54
+ type RouteParams<M extends APIRoutes["method"], P extends string> = Extract<APIRoutes, {
55
+ method: M;
56
+ path: P;
57
+ }>["params"];
58
+
43
59
  /**
44
60
  * Custom Error class for Stoat API failures
45
61
  */
@@ -63,17 +79,17 @@ declare class RESTManager {
63
79
  * Generates a local identifier for the bucket based on method and path.
64
80
  */
65
81
  private getRouteKey;
66
- makeRequest(method: string, endpoint: string, body?: any): Promise<any>;
82
+ makeRequest<M extends APIRoutes["method"], P extends ValidPath<M>>(method: M, endpoint: P, params?: RouteParams<M, P>): Promise<RouteResponse<M, P>>;
67
83
  private execute;
68
84
  /**
69
85
  * Uploads a file to Stoat's CDN and returns the File ID
70
86
  */
71
87
  uploadFile(tag: CDNTag, fileBuffer: Buffer | Blob, filename?: string): Promise<string>;
72
- get(endpoint: string): Promise<any>;
73
- post(endpoint: string, body?: any): Promise<any>;
74
- patch(endpoint: string, body?: any): Promise<any>;
75
- delete(endpoint: string, body?: any): Promise<any>;
76
- put(endpoint: string, body?: any): Promise<any>;
88
+ get<P extends ValidPath<"get">>(endpoint: P, params?: RouteParams<"get", P>): Promise<RouteResponse<"get", P>>;
89
+ post<P extends ValidPath<"post">>(endpoint: P, params?: RouteParams<"post", P>): Promise<RouteResponse<"post", P>>;
90
+ patch<P extends ValidPath<"patch">>(endpoint: P, params?: RouteParams<"patch", P>): Promise<RouteResponse<"patch", P>>;
91
+ delete<P extends ValidPath<"delete">>(endpoint: P, params?: RouteParams<"delete", P>): Promise<RouteResponse<"delete", P>>;
92
+ put<P extends ValidPath<"put">>(endpoint: P, params?: RouteParams<"put", P>): Promise<RouteResponse<"put", P>>;
77
93
  }
78
94
 
79
95
  /**
@@ -83,7 +99,7 @@ declare abstract class Base {
83
99
  readonly id: string;
84
100
  cachedAt: number;
85
101
  protected readonly client: Client;
86
- constructor(client: Client, data: {
102
+ protected constructor(client: Client, data: {
87
103
  _id: string;
88
104
  });
89
105
  /**
@@ -110,8 +126,8 @@ type AttachmentMetadata = {
110
126
  type: "Image";
111
127
  width: number;
112
128
  height: number;
113
- thumbhash?: number[];
114
- animated?: boolean;
129
+ thumbhash?: number[] | null;
130
+ animated?: boolean | null;
115
131
  } | {
116
132
  type: "Video";
117
133
  width: number;
@@ -126,11 +142,11 @@ declare class Attachment extends Base {
126
142
  size: number;
127
143
  deleted?: boolean;
128
144
  reported?: boolean;
129
- messageId?: string;
130
- userId?: string;
131
- serverId?: string;
132
- objectId?: string;
133
- constructor(client: Client, data: any);
145
+ messageId?: string | null | undefined;
146
+ userId?: string | null | undefined;
147
+ serverId?: string | null | undefined;
148
+ objectId?: string | null | undefined;
149
+ constructor(client: Client, data: File);
134
150
  /**
135
151
  * Automatically constructs the direct CDN URL for this file
136
152
  */
@@ -141,29 +157,12 @@ declare class Attachment extends Base {
141
157
  get isImage(): boolean;
142
158
  }
143
159
 
144
- declare enum UserRelationship {
145
- None = "None",
146
- User = "User",
147
- Friend = "Friend",
148
- Outgoing = "Outgoing",
149
- Incoming = "Incoming",
150
- Blocked = "Blocked",
151
- BlockedOther = "BlockedOther"
152
- }
153
- declare enum UserPresence {
154
- Online = "Online",
155
- Idle = "Idle",
156
- Focus = "Focus",
157
- Busy = "Busy",
158
- Invisible = "Invisible"
159
- }
160
+ type UserRelationShip = "None" | "User" | "Friend" | "Outgoing" | "Incoming" | "Blocked" | "BlockedOther";
160
161
  interface BotInformation {
161
162
  owner: string;
162
163
  }
163
- interface UserStatus {
164
- presence: UserPresence;
165
- text?: string | null;
166
- }
164
+ type UserStatus = NonNullable<User$1["status"]>;
165
+ type UserPresence = NonNullable<UserStatus["presence"]>;
167
166
  interface UserProfile {
168
167
  background?: string | null;
169
168
  content?: string | null;
@@ -171,7 +170,7 @@ interface UserProfile {
171
170
  declare class User extends Base {
172
171
  discriminator: string;
173
172
  online: boolean;
174
- relationship: UserRelationship;
173
+ relationship: UserRelationShip;
175
174
  username: string;
176
175
  avatar?: Attachment | null;
177
176
  badges?: number;
@@ -180,8 +179,8 @@ declare class User extends Base {
180
179
  flags?: number;
181
180
  privileged?: boolean;
182
181
  status?: UserStatus | null;
183
- constructor(client: Client, data: any);
184
- _patch(data: any, clear?: string[]): void;
182
+ constructor(client: Client, data: User$1);
183
+ _patch(data: User$1, clear?: string[]): void;
185
184
  /**
186
185
  * Convenience getter to return the user's tag (username#discriminator)
187
186
  */
@@ -271,7 +270,8 @@ interface MemberBanOptions {
271
270
  deleteMessageSeconds?: number;
272
271
  }
273
272
  interface FetchMembersOptions {
274
- exclude_offline?: boolean;
273
+ /** Whether to exclude offline users from the fetch */
274
+ excludeOffline?: boolean;
275
275
  }
276
276
  declare class MemberManager extends BaseManager<string, Member> {
277
277
  server: Server;
@@ -280,12 +280,12 @@ declare class MemberManager extends BaseManager<string, Member> {
280
280
  * Tell BaseManager how to handle Revolt's Member IDs
281
281
  * @internal
282
282
  */
283
- protected extractId(data: any): string;
283
+ protected extractId(data: Member$1): string;
284
284
  /**
285
285
  * Tell BaseManager how to build a Member
286
286
  * @internal
287
287
  */
288
- protected construct(data: any): Member;
288
+ protected construct(data: Member$1): Member;
289
289
  /**
290
290
  * Resolve a string or mention to Member
291
291
  * @param member The MemberResolvable to resolve
@@ -552,14 +552,20 @@ declare class Permissions extends BitField {
552
552
  remove(...bits: PermissionResolvable[]): this;
553
553
  }
554
554
 
555
+ type RawDMChannel = Extract<Channel, {
556
+ channel_type: "DirectMessage";
557
+ }>;
555
558
  declare class DMChannel extends BaseChannel {
556
559
  active: boolean;
557
560
  recipients: string[];
558
561
  lastMessageId: string | null;
559
- constructor(client: any, data: any);
560
- _patch(data: any): void;
562
+ constructor(client: Client, data: RawDMChannel);
563
+ _patch(data: RawDMChannel): void;
561
564
  }
562
565
 
566
+ type RawGroupChannel = Extract<Channel, {
567
+ channel_type: "Group";
568
+ }>;
563
569
  declare class GroupChannel extends BaseChannel {
564
570
  name: string;
565
571
  ownerId: string;
@@ -568,8 +574,8 @@ declare class GroupChannel extends BaseChannel {
568
574
  icon: Attachment | null;
569
575
  lastMessageId?: string | null;
570
576
  nsfw: boolean;
571
- constructor(client: Client, data: any);
572
- _patch(data: any, clear?: string[]): void;
577
+ constructor(client: Client, data: RawGroupChannel);
578
+ _patch(data: RawGroupChannel, clear?: string[]): void;
573
579
  /** Gets the User object of the person who owns this group */
574
580
  get owner(): User | undefined;
575
581
  /** Resolves the recipient IDs into an array of cached User objects */
@@ -600,11 +606,11 @@ declare class UserManager extends BaseManager<string, User> {
600
606
  /**
601
607
  * Tell BaseManager how to find the ID for Users
602
608
  */
603
- protected extractId(data: any): string;
609
+ protected extractId(data: User$1): string;
604
610
  /**
605
611
  * Tell BaseManager how to build a User
606
612
  */
607
- protected construct(data: any): User;
613
+ protected construct(data: User$1): User;
608
614
  /**
609
615
  * Resolves a UserResolvable to a User object from the cache.
610
616
  */
@@ -704,11 +710,11 @@ declare class MessageManager extends BaseManager<string, Message> {
704
710
  /**
705
711
  * Tell BaseManager how to find the ID for Messages
706
712
  */
707
- protected extractId(data: any): string;
713
+ protected extractId(data: Message$1): string;
708
714
  /**
709
715
  * Tell BaseManager how to build a Message
710
716
  */
711
- protected construct(data: any): Message;
717
+ protected construct(data: Message$1): Message;
712
718
  fetch(id: string): Promise<Message>;
713
719
  /**
714
720
  * Fetches multiple messages from the channel using specific filter parameters.
@@ -815,8 +821,8 @@ declare class ChannelManager extends BaseManager<string, BaseChannel> {
815
821
  * @param limit The maximum number of channels to hold in the cache.
816
822
  */
817
823
  constructor(client: Client, limit?: number);
818
- protected extractId(data: any): string;
819
- protected construct(data: any): BaseChannel;
824
+ protected extractId(data: Channel): string;
825
+ protected construct(data: Channel): BaseChannel;
820
826
  /**
821
827
  * Resolves a ChannelResolvable to a cached BaseChannel object.
822
828
  * @param channel The ChannelResolvable to resolve.
@@ -920,21 +926,24 @@ declare class ChannelManager extends BaseManager<string, BaseChannel> {
920
926
  bulkDelete(id: string, messages: MessageResolvable[]): Promise<void>;
921
927
  }
922
928
 
929
+ type RawTextChannel = Extract<Channel, {
930
+ channel_type: "TextChannel";
931
+ }>;
923
932
  declare class TextChannel extends BaseChannel {
924
933
  name: string;
925
934
  serverId: string;
926
935
  defaultPermissions?: {
927
936
  a: number;
928
937
  d: number;
929
- };
930
- description?: string | null;
938
+ } | null | undefined;
939
+ description?: string | null | undefined;
931
940
  icon?: Attachment | null;
932
- lastMessageId?: string | null;
941
+ lastMessageId?: string | null | undefined;
933
942
  nsfw?: boolean;
934
943
  slowmode?: number;
935
944
  voice?: any;
936
- constructor(client: Client, data: any);
937
- _patch(data: any, clear?: string[]): void;
945
+ constructor(client: Client, data: RawTextChannel);
946
+ _patch(data: RawTextChannel, clear?: string[]): void;
938
947
  /**
939
948
  * Updates the permission overrides for the channel.
940
949
  * @param roleId The raw string ID of the role to update.
@@ -1128,11 +1137,7 @@ declare class MessageCollector extends Collector<string, Message> {
1128
1137
  endReason(): string | null;
1129
1138
  }
1130
1139
 
1131
- declare enum ChannelType {
1132
- TEXT = "TextChannel",
1133
- DM = "DirectMessage",
1134
- GROUP = "Group"
1135
- }
1140
+ type ChannelType = "SavedMessages" | "DirectMessage" | "Group" | "TextChannel";
1136
1141
  interface ChannelCreateOptions {
1137
1142
  name: string;
1138
1143
  type: "Text" | "Voice";
@@ -1145,7 +1150,7 @@ interface ChannelCreateOptions {
1145
1150
  declare abstract class BaseChannel extends Base {
1146
1151
  type: ChannelType;
1147
1152
  messages: MessageManager;
1148
- protected constructor(client: Client, data: any);
1153
+ protected constructor(client: Client, data: Channel);
1149
1154
  /**
1150
1155
  * Sends a message to this channel.
1151
1156
  * @param contentOrOptions The string content or message options payload.
@@ -1258,17 +1263,17 @@ declare class ServerChannelManager {
1258
1263
  declare class Role extends Base {
1259
1264
  serverId: string;
1260
1265
  name: string;
1261
- color: string | null;
1266
+ color: string | null | undefined;
1262
1267
  hoist: boolean;
1263
1268
  rank: number;
1264
1269
  icon: Attachment | null;
1265
1270
  private _permissions;
1266
- constructor(client: Client, data: any, serverId: string);
1271
+ constructor(client: Client, data: Role$1, serverId: string);
1267
1272
  /**
1268
1273
  * Updates the role instance with new data without losing the object reference.
1269
1274
  * @internal
1270
1275
  */
1271
- _patch(data: any): void;
1276
+ _patch(data: Role$1): void;
1272
1277
  /**
1273
1278
  * The server this role belongs to.
1274
1279
  * Pulls dynamically from the cache to prevent massive memory duplication.
@@ -1427,11 +1432,11 @@ declare class RoleManager extends BaseManager<string, Role> {
1427
1432
  /**
1428
1433
  * Tell BaseManager how to find the ID for Roles
1429
1434
  */
1430
- protected extractId(data: any): string;
1435
+ protected extractId(data: Role$1): string;
1431
1436
  /**
1432
1437
  * Tell BaseManager how to build a Role
1433
1438
  */
1434
- protected construct(data: any): Role;
1439
+ protected construct(data: Role$1): Role;
1435
1440
  /**
1436
1441
  * Adds or updates a role in the local cache.
1437
1442
  * @internal
@@ -1439,7 +1444,7 @@ declare class RoleManager extends BaseManager<string, Role> {
1439
1444
  * @param idParam An optional ID parameter if the payload wraps the role object.
1440
1445
  * @returns The newly created or updated Role object.
1441
1446
  */
1442
- _add(data: any, idParam?: string): Role;
1447
+ _add(data: Role$1, idParam?: string): Role;
1443
1448
  [util.inspect.custom](): Collection<string, Role>;
1444
1449
  /**
1445
1450
  * Resolves a RoleResolvable to a Role object from the cache.
@@ -1554,15 +1559,15 @@ declare class ServerInvite {
1554
1559
  code: string;
1555
1560
  creatorId: string;
1556
1561
  channelId: string;
1557
- constructor(data: any);
1558
- _patch(data: any): void;
1562
+ constructor(data: Invite);
1563
+ _patch(data: Invite): void;
1559
1564
  }
1560
1565
 
1561
1566
  declare class ServerInviteManager extends BaseManager<string, ServerInvite> {
1562
1567
  server: Server;
1563
1568
  constructor(client: Client, server: Server, limit?: number);
1564
- protected extractId(data: any): string;
1565
- protected construct(data: any): ServerInvite;
1569
+ protected extractId(data: Invite): string;
1570
+ protected construct(data: Invite): ServerInvite;
1566
1571
  /**
1567
1572
  * Fetches all active invites for this server.
1568
1573
  */
@@ -1572,8 +1577,8 @@ declare class ServerInviteManager extends BaseManager<string, ServerInvite> {
1572
1577
  declare class ServerBan {
1573
1578
  userId: string;
1574
1579
  reason: string | null;
1575
- constructor(data: any);
1576
- _patch(data: any): void;
1580
+ constructor(data: ServerBan$1);
1581
+ _patch(data: ServerBan$1): void;
1577
1582
  }
1578
1583
 
1579
1584
  declare class ServerBanManager extends BaseManager<string, ServerBan> {
@@ -1618,11 +1623,11 @@ declare class ServerManager extends BaseManager<string, Server> {
1618
1623
  /**
1619
1624
  * Tell BaseManager how to find the ID for Servers
1620
1625
  */
1621
- protected extractId(data: any): string;
1626
+ protected extractId(data: Server$1): string;
1622
1627
  /**
1623
1628
  * Tell BaseManager how to build a Server
1624
1629
  */
1625
- protected construct(data: any): Server;
1630
+ protected construct(data: Server$1): Server;
1626
1631
  /**
1627
1632
  * Fetches a server from the API.
1628
1633
  * @param id The server ID.
@@ -1633,18 +1638,20 @@ declare class ServerManager extends BaseManager<string, Server> {
1633
1638
  [util.inspect.custom](): Collection<string, Server>;
1634
1639
  }
1635
1640
 
1636
- interface EmojiParent {
1637
- id: string;
1641
+ type EmojiParent = {
1638
1642
  type: "Server";
1639
- }
1643
+ id: string;
1644
+ } | {
1645
+ type: "Detached";
1646
+ };
1640
1647
  declare class Emoji extends Base {
1641
1648
  creatorId: string;
1642
1649
  name: string;
1643
1650
  parent: EmojiParent;
1644
1651
  animated: boolean;
1645
1652
  nsfw: boolean;
1646
- constructor(client: Client, data: any);
1647
- _patch(data: any): void;
1653
+ constructor(client: Client, data: Emoji$1);
1654
+ _patch(data: Emoji$1): void;
1648
1655
  }
1649
1656
 
1650
1657
  declare class EmojiManager extends BaseManager<string, Emoji> {
@@ -1662,11 +1669,6 @@ declare class EmojiManager extends BaseManager<string, Emoji> {
1662
1669
  [util.inspect.custom](): Collection<string, Emoji>;
1663
1670
  }
1664
1671
 
1665
- interface Categories {
1666
- channels: string[];
1667
- id: string;
1668
- title: string;
1669
- }
1670
1672
  declare class Server extends Base {
1671
1673
  channelIds: string[];
1672
1674
  defaultPermissions: bigint;
@@ -1674,7 +1676,7 @@ declare class Server extends Base {
1674
1676
  ownerId: string;
1675
1677
  analytics: boolean;
1676
1678
  banner: Attachment | null;
1677
- categories: Categories[];
1679
+ categories: Category[] | null;
1678
1680
  description: string | null;
1679
1681
  discoverable: boolean;
1680
1682
  flags: number;
@@ -1686,11 +1688,11 @@ declare class Server extends Base {
1686
1688
  bans: ServerBanManager;
1687
1689
  invites: ServerInviteManager;
1688
1690
  emojis: EmojiManager;
1689
- constructor(client: Client, data: any);
1691
+ constructor(client: Client, data: Server$1);
1690
1692
  /**
1691
1693
  * Updates the server instance with new data without losing the object reference.
1692
1694
  */
1693
- _patch(data: any, clear?: string[]): void;
1695
+ _patch(data: Server$1, clear?: string[]): void;
1694
1696
  /**
1695
1697
  * Edits this server.
1696
1698
  * @param options The fields to update.
@@ -1699,7 +1701,7 @@ declare class Server extends Base {
1699
1701
  /**
1700
1702
  * Leaves the server
1701
1703
  */
1702
- leave(): Promise<any>;
1704
+ leave(): Promise<never>;
1703
1705
  /**
1704
1706
  * Fetches multiple members from this server.
1705
1707
  * @param options Filter options for the fetch request.
@@ -1757,8 +1759,8 @@ declare class Member extends Base {
1757
1759
  canPublish: boolean;
1758
1760
  canRecieve: boolean;
1759
1761
  roles: MemberRoleManager;
1760
- constructor(client: Client, data: any);
1761
- _patch(data: any): void;
1762
+ constructor(client: Client, data: Member$1, serverId?: string);
1763
+ _patch(data: Member$1): void;
1762
1764
  /**
1763
1765
  * Get member role IDs
1764
1766
  */
@@ -1903,6 +1905,30 @@ declare class ReactionCollector extends Collector<string, MessageReaction> {
1903
1905
  endReason(): string | null;
1904
1906
  }
1905
1907
 
1908
+ declare class MessageMentions {
1909
+ private readonly client;
1910
+ private readonly message;
1911
+ /** Raw user IDs from the API */
1912
+ readonly userIds: string[];
1913
+ /** Raw role IDs from the API */
1914
+ readonly roleIds: string[];
1915
+ /** Raw channel IDs parsed from message content */
1916
+ readonly channelIds: string[];
1917
+ constructor(client: Client, message: Message, userIds: string[] | null, roleIds: string[] | null);
1918
+ /** Mentioned users resolved from cache */
1919
+ get users(): Collection<string, User>;
1920
+ /** Mentioned members resolved from cache (only in server channels) */
1921
+ get members(): Collection<string, Member>;
1922
+ /** Mentioned roles resolved from cache */
1923
+ get roles(): Collection<string, Role>;
1924
+ /** Mentioned channels resolved from cache */
1925
+ get channels(): Collection<string, BaseChannel>;
1926
+ /** Whether the given user ID is mentioned */
1927
+ has(userId: string): boolean;
1928
+ private static parseChannelIds;
1929
+ [util__default.inspect.custom](depth: number, options: util__default.InspectOptions, inspect: typeof util__default.inspect): string;
1930
+ }
1931
+
1906
1932
  interface MessageOptions {
1907
1933
  content?: string;
1908
1934
  embeds?: (TextEmbedData | EmbedBuilder)[];
@@ -1913,9 +1939,9 @@ interface MessageOptions {
1913
1939
  replies?: ReplyIntent[];
1914
1940
  }
1915
1941
  interface Masquerade {
1916
- avatar?: string;
1917
- name?: string;
1918
- colour?: string;
1942
+ avatar?: string | null;
1943
+ name?: string | null;
1944
+ colour?: string | null;
1919
1945
  }
1920
1946
  interface ReplyIntent {
1921
1947
  id: string;
@@ -1930,19 +1956,18 @@ declare class Message extends Base {
1930
1956
  content: string | null;
1931
1957
  authorId: string;
1932
1958
  channelId: string;
1933
- embeds: any[];
1959
+ embeds: Embed[] | null;
1934
1960
  attachments: Attachment[];
1935
1961
  editedAt: Date | null;
1936
1962
  createdAt: Date | null;
1937
1963
  flags: number;
1938
1964
  interactions: Interaction | null;
1939
1965
  masquerade: Masquerade | null;
1940
- mentions: string[];
1941
- pinned: boolean;
1966
+ mentions: MessageMentions;
1967
+ pinned: null | boolean;
1942
1968
  reactions: Record<string, string[]>;
1943
- replies: string[];
1944
- role_mentions: string[];
1945
- constructor(client: Client, data: any);
1969
+ replies: string[] | null;
1970
+ constructor(client: Client, data: Message$1);
1946
1971
  reply(contentOrOptions: string | MessageOptions): Promise<Message>;
1947
1972
  /**
1948
1973
  * Edits this message.
@@ -2024,7 +2049,7 @@ declare class Message extends Base {
2024
2049
  get serverId(): string | undefined;
2025
2050
  /** Gets the Server object from cache */
2026
2051
  get server(): Server | undefined;
2027
- _patch(data: any): void;
2052
+ _patch(data: Message$1): void;
2028
2053
  [util.inspect.custom](depth: number, options: util.InspectOptions, inspect: typeof util.inspect): string;
2029
2054
  }
2030
2055
 
@@ -2032,7 +2057,7 @@ declare class Message extends Base {
2032
2057
  * Represents the authenticated bot's user object.
2033
2058
  */
2034
2059
  declare class ClientUser extends User {
2035
- constructor(client: Client, data: any);
2060
+ constructor(client: Client, data: User$1);
2036
2061
  }
2037
2062
 
2038
2063
  interface SweeperOptions {
@@ -2082,7 +2107,18 @@ interface ClientEvents {
2082
2107
  serverDelete: [server: Server | string];
2083
2108
  userUpdate: [oldUser: User, newUser: User];
2084
2109
  serverMemberJoin: [member: Member];
2085
- serverMemberLeave: [member: Member];
2110
+ serverMemberLeave: [member: Member | {
2111
+ serverId: string;
2112
+ userId: string;
2113
+ }];
2114
+ serverBanAdd: [member: Member | {
2115
+ serverId: string;
2116
+ userId: string;
2117
+ }];
2118
+ serverMemberKick: [member: Member | {
2119
+ serverId: string;
2120
+ userId: string;
2121
+ }];
2086
2122
  }
2087
2123
  interface ClientOptions {
2088
2124
  sweepers?: SweeperOptions;
@@ -2117,7 +2153,7 @@ declare class Client extends EventEmitter {
2117
2153
  * A fallback class for channel types that are not yet officially supported by the library.
2118
2154
  */
2119
2155
  declare class UnknownChannel extends BaseChannel {
2120
- constructor(client: Client, data: any);
2156
+ constructor(client: Client, data: Channel);
2121
2157
  }
2122
2158
 
2123
- export { Attachment, AttachmentBuilder, type AttachmentMetadata, Base, BaseChannel, BitField, type BitFieldResolvable, type BotInformation, type CDNTag, type Categories, type ChannelCreateOptions, type ChannelEditOptions, ChannelManager, type ChannelResolvable, type ChannelRolePermissionOptions, ChannelType, Client, type ClientEvents, type ClientOptions, ClientUser, Collection, Collector, type CollectorOptions, DMChannel, EmbedBuilder, Emoji, EmojiManager, type EmojiParent, type FetchMembersOptions, GatewayManager, type Interaction, type Masquerade, Member, type MemberBanOptions, type MemberEditOptions, MemberManager, type MemberResolvable, Message, MessageCollector, type MessageCollectorOptions, type MessageFetchOptions, MessageManager, type MessageOptions, MessageReaction, type MessageResolvable, PermissionFlags, type PermissionResolvable, type PermissionString, Permissions, RESTManager, ReactionCollector, type ReactionCollectorOptions, type ReplyIntent, Role, type RoleCreateOptions, type RoleEditOptions, RoleManager, type RolePermissionOptions, type RoleResolvable, Server, ServerChannelManager, type ServerEditOptions, ServerManager, StoatAPIError, SweeperManager, type SweeperOptions, TextChannel, type TextEmbedData, UnknownChannel, User, type UserEditOptions, UserManager, UserPresence, type UserProfile, UserRelationship, type UserResolvable, type UserStatus };
2159
+ export { Attachment, AttachmentBuilder, type AttachmentMetadata, Base, BaseChannel, BitField, type BitFieldResolvable, type BotInformation, type CDNTag, type ChannelCreateOptions, type ChannelEditOptions, ChannelManager, type ChannelResolvable, type ChannelRolePermissionOptions, type ChannelType, Client, type ClientEvents, type ClientOptions, ClientUser, Collection, Collector, type CollectorOptions, DMChannel, EmbedBuilder, Emoji, EmojiManager, type EmojiParent, type FetchMembersOptions, GatewayManager, GroupChannel, type Interaction, type Masquerade, Member, type MemberBanOptions, type MemberEditOptions, MemberManager, type MemberResolvable, Message, MessageCollector, type MessageCollectorOptions, type MessageFetchOptions, MessageManager, type MessageOptions, MessageReaction, type MessageResolvable, PermissionFlags, type PermissionResolvable, type PermissionString, Permissions, RESTManager, type RawDMChannel, type RawGroupChannel, type RawTextChannel, ReactionCollector, type ReactionCollectorOptions, type ReplyIntent, Role, type RoleCreateOptions, type RoleEditOptions, RoleManager, type RolePermissionOptions, type RoleResolvable, Server, ServerChannelManager, type ServerEditOptions, ServerManager, StoatAPIError, SweeperManager, type SweeperOptions, TextChannel, type TextEmbedData, UnknownChannel, User, type UserEditOptions, UserManager, type UserPresence, type UserProfile, type UserRelationShip, type UserResolvable, type UserStatus };