This repository was archived by the owner on Aug 28, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
2829 lines (2434 loc) · 80.4 KB
/
index.d.ts
File metadata and controls
2829 lines (2434 loc) · 80.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import ValueSaver from 'valuesaver';
import EventEmitter from 'events';
import { PermissionsBitField, PermissionFlags, EmbedBuilder, ActionRowBuilder as DiscordActionRowBuilder, Attachment } from 'discord.js';
import { Readable } from 'stream';
type addonOptions = {
name: string;
description: string;
author: string;
version: string;
bitfield: [number] | number;
};
type CategoryOption = "General" | "Polls" | "Games" | "Fun" | "Giveaway" | "Music" | "Moderation" | "Economy" | "Level" | "Tickets" | "Bot" | "Admin";
type SaveDataType = Map<any, any> | object | Array<any> | ValueSaver;
type AddonEvents = {
ready: [];
}
type CommandEvents = {
execute: [Command]
}
type MessageContentType = {content: string; embeds: [EmbedBuilder], files: [string], components: [DiscordActionRowBuilder]} | string | EmbedBuilder | ButtonBuilder | SelectMenuBuilder | ActionRowBuilder;
type ChannelType = TextChannel | VoiceChannel | StageChannel | CategoryChannel | DirectoryChannel | ForumChannel | DMChannel | ThreadChannel;
type ChannelStringTypes = 'GuildText' | 'DM' | 'GuildVoice' | 'GroupDM' | 'GuildCategory' | 'GuildAnnouncement' | 'AnnouncementThread' | 'PublicThread' | 'PrivateThread' | 'GuildStageVoice' | 'GuildDirectory' | 'GuildForum';
type ButtonStyleType = 'primary' | 'secondary' | 'success' | 'danger' | 'blurple' | 'gray' | 'grey' | 'red' | 'green' | number;
type ResolvableDate = string | number | Date;
type CreateMessageBasedThreadOptions = {
name: string;
autoArchiveThread: ResolvableDate;
slowMode: ResolvableDate;
reason: string;
};
type CreateInviteOptions = {
maxAge: number;
maxUses: number;
temporary: boolean;
targetUser: string | User;
targetType: 'application' | 'user' | 'EmbeddedApplication' | number;
targetApplication: string; unique?: boolean;
reason: string;
}
type AvatarOptions = {
dynamic: boolean;
size: string;
extension: string;
};
type BannerOptions = AvatarOptions;
type BanOptions = {
deleteMessagesTime: ResolvableDate;
reason: string;
};
type ResolvableMember = Member | string;
type CreateEmojiOptions = {
imageUrl: string;
name: string;
reason: string;
};
type ResolvableEmoji = Emoji | string;
type CreateRoleOptions = {
name: string;
color: string | number;
reason: string;
position: number;
hoist: boolean;
permissions: [permissionFlagsBitsObject];
};
type ResolvableRole = Role | string;
type ResolvableParent = CategoryChannel | string;
type VideoQualityModeType = 'full' | 'auto' | 1 | 2;
type OverwriteType = 'member' | 'user' | 'role';
type PermissionsOverwrite = [{
type: OverwriteType,
id: string;
deny: [permissionFlagsBitsObject],
allow: [permissionFlagsBitsObject]
}];
type CreateChannelOptions = {
name: string;
slowMode: ResolvableDate;
autoArchiveThreads: ResolvableDate;
parent: ResolvableParent;
type: ChannelStringTypes;
topic: string;
nsfw: boolean;
bitrate: number;
userLimit: number;
position: number;
videoQualityMode: VideoQualityModeType;
rtcRegion: string;
reason: string;
permissions: PermissionsOverwrite;
};
type ActivityType = 'competing' | 'listening' | 'watching' | 'playing' | 'streaming';
type StatusType = 'online' | 'dnd' | 'idle' | 'offline';
type AvatarResolvable = string | Buffer;
type permissionsEditOptions = {
AddReactions: boolean;
Administrator: boolean;
AttachFiles: boolean;
BanMembers: boolean;
ChangeNickname: boolean;
Connect: boolean;
CreateInstantInvite: boolean;
CreatePrivateThreads: boolean;
CreatePublicThreads: boolean;
DeafenMembers: boolean;
EmbedLinks: boolean;
KickMembers: boolean;
ManageChannels: boolean;
ManageEmojisAndStickers: boolean;
ManageEvents: boolean;
ManageGuild: boolean;
ManageGuildExpressions: boolean;
ManageMessages: boolean;
ManageNicknames: boolean;
ManageRoles: boolean;
ManageThreads: boolean;
ManageWebhooks: boolean;
MentionEveryone: boolean;
ModerateMembers: boolean;
MoveMembers: boolean;
MuteMembers: boolean;
PrioritySpeaker: boolean;
ReadMessageHistory: boolean;
RequestToSpeak: boolean;
SendMessages: boolean;
SendMessagesInThreads: boolean;
SendTTSMessages: boolean;
SendVoiceMessages: boolean;
Speak: boolean;
Stream: boolean;
UseApplicationCommands: boolean;
UseEmbeddedActivities: boolean;
UseExternalEmojis: boolean;
UseExternalSounds: boolean;
UseExternalStickers: boolean;
UseSoundboard: boolean;
UseVAD: boolean;
ViewAuditLog: boolean;
ViewChannel: boolean;
ViewCreatorMonetizationAnalytics: boolean;
ViewGuildInsights: boolean;
};
type UserResolvable = User | string;
type CommandOptionType = string | number | ChannelType | Role;
type ParentResolvable = CategoryChannel | string;
type ResolvableMemberOrRole = User | Member | Role | string;
type ForumChannelEditOptions = {
name: string;
position: number;
topic: string;
nsfw: boolean;
parent: ParentResolvable;
reason: string;
slowMode: ResolvableDate;
autoArchiveThreads: ResolvableDate;
permissions: PermissionsOverwrite;
};
type TextChannelEditOptions = {
name: string;
position: number;
topic: string;
nsfw: boolean;
parent: ParentResolvable;
reason: string;
slowMode: ResolvableDate;
autoArchiveThreads: ResolvableDate;
permissions: PermissionsOverwrite;
};
type CreateThreadOptions = {
name: string;
slowMode: ResolvableDate;
autoArchiveThreads: ResolvableDate;
reason: string;
};
type ThreadEditOptions = {
name: string;
reason: string;
slowMode: ResolvableDate;
autoArchiveThreads: ResolvableDate;
archived: boolean;
locked: boolean;
};
type VoiceChannelEditOptions = {
name: string;
position: number;
nsfw: boolean;
parent: ParentResolvable;
reason: string;
bitrate: number;
userLimit: number;
slowMode: ResolvableDate;
videoQualityMode: VideoQualityModeType | number;
rtcRegion: string;
permissions: PermissionsOverwrite;
};
type rawTicketInfo = {
channel: string;
claimed: boolean | string;
closed: boolean;
guild: string;
category: boolean | string;
}
type ReactionCollectorEvents = {
end: [];
collect: [Reaction, User];
}
type InteractionCollectorEvents = {
end: [];
collect: [MenuInteraction | ButtonInteraction];
}
type CreateReactionCollectorOptions = {
filter: (reaction: Reaction, user: User) => boolean;
max: number;
time: number;
};
type CreateInteractionCollectorOptions = {
filter: (interaction: MenuInteraction | ButtonInteraction) => boolean;
max: number;
time: number;
};
type BotEvents = {
menuSelect: [MenuInteraction];
buttonClick: [ButtonInteraction];
formSubmit: [FormInteraction];
roleDelete: [Role, BaseEntry];
roleUpdate: [Role, Role, BaseEntry];
roleAdd: [Role, BaseEntry];
channelDelete: [ChannelType, BaseEntry];
channelUpdate: [ChannelType, BaseEntry];
channelAdd: [ChannelType, BaseEntry];
emojiDelete: [Emoji, BaseEntry];
emojiUpdate: [Emoji, Emoji, BaseEntry];
emojiAdd: [Emoji, BaseEntry];
guildDelete: [Guild];
guildNameChange: [Guild, Guild, BaseEntry];
guildDescriptionChange: [Guild, Guild, BaseEntry];
guildOwnerChange: [Guild, Guild, BaseEntry];
guildBoost: [Guild, Guild, BaseEntry];
guildAdd: [Guild];
inviteCreate: [Invite];
inviteDelete: [Invite];
reactionDelete: [Reaction];
reactionAdd: [Reaction];
messageUpdate: [Message, Message];
messageDelete: [Message, User];
message: [Message];
membersPrune: [Save<string, Member>, Guild];
ticketClose: [ChannelType, Buffer, rawTicketInfo];
levelUp: [Member];
memberBan: [BanEntry];
bannerChange: [User, User];
avatarChange: [User, User];
discriminatorChange: [User, User];
usernameChange: [User, User];
roleChange: [Member, Member, BaseEntry];
nicknameChange: [Member, Member, BaseEntry];
memberMuteRemove: [Member, Member, MuteEntry];
memberMuteAdd: [Member, Member, MuteEntry];
memberKick: [KickEntry];
memberLeave: [Member];
memberAdd: [Member];
voiceUpdate: [VoiceState, VoiceState];
};
type WebSocketHandlerEvent = {
connection: [WebSocket, RequestInfo];
};
type WebSocketEvents = {
message: [string];
close: [];
};
declare class HTTPEventListener extends EventEmitter{
on<T>(eventName: T, listener: (request: RequestInfo, response: ResponseInfo) => void);
once<T>(eventName: T, listener: (request: RequestInfo, response: ResponseInfo) => void);
emit<T>(eventName: T, listener: (request: RequestInfo, response: ResponseInfo) => void);
}
declare class RequestInfo{
url: string;
method: string;
headers: object;
query: URLSearchParams;
body: string | null;
ip: string;
}
declare class ResponseInfo{
/**
* Set the status code of the web page
* @param statusCode The status code you want to send to the client
*/
setStatusCode(statusCode: number);
/**
* Send the response headers to the client
* @param headers The response headers
*/
setHeaders(headers: object);
/**
* Send a response to the client
* @param response The response you want to send
*/
send(response: string | Buffer);
/**
* Send a response to the client
* @param response The response you want to send
*/
end(response: string | Buffer);
/**
* Write a response to the client, but doesn't send it yet, it sends the response after calling the `end` or `send` function
* @param chunk The response you want to send
*/
write(chunk: string | Buffer);
/**
* Sends a status to the client
* @param statusCode The status code to send to the client
* @param headers The response headers to send to the client
*/
setStatus(statusCode?: number, headers?: object);
}
declare class HTTPServer{
post: HTTPEventListener;
get: HTTPEventListener;
errorMessages: [];
}
declare class WebSocket extends EventEmitter{
id: string;
/**
* Sends a message to the client
* @param data The message to send to the client
*/
send(data: Buffer | string);
/**
* Closes the connection with the client
*/
close();
on<T extends keyof WebSocketEvents>(eventName: T, listener: (...args: WebSocketEvents[T]) => void);
once<T extends keyof WebSocketEvents>(eventName: T, listener: (...args: WebSocketEvents[T]) => void);
emit<T extends keyof WebSocketEvents>(eventName: T, listener: (...args: WebSocketEvents[T]) => void);
}
declare class WebSocketHandler extends EventEmitter{
sockets: [];
errorMessages: [];
on<T extends keyof WebSocketHandlerEvent>(eventName: T, listener: (...args: WebSocketHandlerEvent[T]) => void);
once<T extends keyof WebSocketHandlerEvent>(eventName: T, listener: (...args: WebSocketHandlerEvent[T]) => void);
emit<T extends keyof WebSocketHandlerEvent>(eventName: T, listener: (...args: WebSocketHandlerEvent[T]) => void);
}
declare class ReactionCollector extends EventEmitter{
on<T extends keyof ReactionCollectorEvents>(eventName: T, listener: (...args: ReactionCollectorEvents[T]) => void);
once<T extends keyof ReactionCollectorEvents>(eventName: T, listener: (...args: ReactionCollectorEvents[T]) => void);
emit<T extends keyof ReactionCollectorEvents>(eventName: T, listener: (...args: ReactionCollectorEvents[T]) => void);
/**
* Stops collecting new reactions
*/
stop() : void;
count: number;
max: number;
filter: Function;
id: string;
time: number;
}
declare class InteractionCollector extends EventEmitter{
on<T extends keyof InteractionCollectorEvents>(eventName: T, listener: (...args: InteractionCollectorEvents[T]) => void);
once<T extends keyof InteractionCollectorEvents>(eventName: T, listener: (...args: InteractionCollectorEvents[T]) => void);
emit<T extends keyof InteractionCollectorEvents>(eventName: T, listener: (...args: InteractionCollectorEvents[T]) => void);
/**
* Stops collecting new reactions
*/
stop() : void;
count: number;
max: number;
filter: Function;
id: string;
time: number;
}
declare class BotEventListener extends EventEmitter{
on<T extends keyof BotEvents>(eventName: T, listener: (...args: BotEvents[T]) => void);
once<T extends keyof BotEvents>(eventName: T, listener: (...args: BotEvents[T]) => void);
emit<T extends keyof BotEvents>(eventName: T, listener: (...args: BotEvents[T]) => void);
}
declare class BotCommandListener extends EventEmitter{
on<T>(eventName: T, listener: (command: Command, next: Function, abort: Function) => void);
once<T>(eventName: T, listener: (command: Command, next: Function, abort: Function) => void);
emit<T>(eventName: T, listener: (command: Command, next: Function, abort: Function) => void);
}
declare class BaseChannel{
id: string;
type: ChannelStringTypes;
created: Date;
createdTimestamp: number;
string: string;
url: string;
/**
* Returns a boolean which defines whether the channel is a text channel or not
*/
isTextChannel() : boolean;
/**
* Returns a boolean which defines whether the channel is a voice channel or not
*/
isVoiceChannel() : boolean;
/**
* Returns a boolean which defines whether the channel is a voice stage channel or not
*/
isVoiceStage() : boolean;
/**
* Returns a boolean which defines whether the channel is a DM channel or not
*/
isDM() : boolean;
/**
* Returns a boolean which defines whether the channel is a thread channel or not
*/
isThread() : boolean;
/**
* Returns a boolean which defines whether the channel is a ticket or not
*/
isTicket() : boolean;
/**
* Returns the owner of the ticket if the channel is a ticket as a Member class
*/
getTicketOwner() : Member | undefined;
/**
* Returns information about the ticket if the channel is a ticket
*/
getTicketInfo() : undefined | {
channelId: string;
claimed?: Member | undefined;
category?: string | undefined;
owner?: Member;
closed: boolean;
};
}
declare class CategoryChannel extends BaseChannel{
viewable: boolean;
name: string;
position: number;
deletable: boolean;
guild: Guild;
guildId: string;
manageable: boolean;
permissions: Save<string, Permissions>;
channels: Save<string, ChannelType>;
/**
* Deletes the category channel
*/
delete() : Promise<void>;
/**
* Changes the name of the category channel
* @param name The new name for the category channel
* @param reason The reason to change the name
*/
setName(name: string, reason?: string) : Promise<CategoryChannel>;
/**
* Changes the order of the categories by changing the position of the category channel
* @param position The new position of the category channel
* @param reason The reason to change the position of the category channel
*/
setPosition(position: number, reason?: string) : Promise<CategoryChannel>;
/**
* Updates the category channel in case there were made changes to it
*/
update() : Promise<CategoryChannel>;
}
declare class GuildChannel extends BaseChannel{
viewable: boolean;
name: string;
guild: Guild;
guildId: string;
manageable: boolean;
position: number;
deletable: boolean;
parent?: CategoryChannel | null | undefined;
parentId?: string | null;
permissionsLocked: boolean;
slowMode: number;
nsfw: boolean;
permissions: Save<string, Permissions>;
/**
* Creates an invite for the specified channel
* @param options Options to customize the invite
*/
createInvite(options: CreateInviteOptions) : Promise<Invite>;
/**
* Marks or unmarks the channel as NSFW
* @param nsfw A boolean which defines whether the channel should be NSFW or not
* @param reason The reason to change the NSFW status
*/
setNSFW(nsfw?: boolean, reason?: string) : Promise<GuildChannel>;
/**
* Deletes the category channel
*/
delete() : Promise<void>;
/**
* Changes the name of the channel
* @param name The new name for the channel
* @param reason The reason to change the name
*/
setName(name: string, reason?: string) : Promise<GuildChannel>;
/**
* Changes the order of the channels by changing the position of the channel
* @param position The new position of the channel
* @param reason The reason to change the position of the channel
*/
setPosition(position: number, reason?: string) : Promise<GuildChannel>;
/**
* Change the parent of the channel
* @param parent The new parent of the channel
* @param reason The reason to change the parent of the channel
*/
setParent(parent: ParentResolvable, reason?: string) : Promise<GuildChannel>;
/**
* Synchronize the permissions of the category channel with the current channel
*/
lockPermissions() : Promise<GuildChannel>;
/**
* Get the permissions for a member or a role in this channel
* @param resolvableMemberOrRole The member or role to get the permissions of
*/
permissionsFor(resolvableMemberOrRole: ResolvableMemberOrRole) : PermissionsBitField;
/**
* Sets a slow mode for this channel
* @param dateResolvable The slow mode for the channel in miliseconds
* @param reason The reason to change the slow mode for this channel
*/
setSlowMode(dateResolvable: ResolvableDate, reason?: string) : Promise<GuildChannel>;
}
declare class ForumChannel extends GuildChannel{
topic: string;
autoArchiveThreads: number;
threads: Save<string, ThreadChannel>;
/**
* Changes the topic of the forum channel
* @param topic The new topic for the forum channel
* @param reason The reason to change the topic
*/
setTopic(topic: string, reason?: string) : Promise<ForumChannel>;
/**
* Updates the forum channel in case changes have been made to it
*/
update() : Promise<ForumChannel>;
/**
* Change the settings of the forum channel
* @param options The settings which should be changed for the channel
*/
edit(options: ForumChannelEditOptions) : Promise<ForumChannel>;
/**
* Creates a new thread channel
* @param options The settings for the thread channel
*/
createThread(options: CreateThreadOptions) : Promise<ThreadChannel>;
}
declare class TextChannel extends GuildChannel{
topic: string;
autoArchiveThreads: number;
threads: Save<string, ThreadChannel>;
messages: Save<string, Message>;
/**
* Changes the topic of the text channel
* @param topic The new topic for the text channel
* @param reason The reason to change the topic
*/
setTopic(topic: string, reason?: string) : Promise<TextChannel>;
/**
* Sends a message in this channel
* @param content The content of the message to send
*/
send(...content: [MessageContentType]) : Promise<Message>;
/**
* Updates the text channel in case changes have been made to it
*/
update() : Promise<TextChannel>;
/**
* Get a message which was sent in this channel
* @param messageId The id of the message to get
*/
getMessage(messageId: string) : Promise<Message>;
/**
* Delete an amount of messages in this channel
* @param amount The amount of messages to delete, max 100 messages per time
* @param filter A function to filter the messages you'd like to delete from the cache
*/
deleteMessages(amount: number, filter: ({key, value} : {key: string; value: Message;}) => boolean) : Promise<void>;
/**
* Change the settings of the text channel
* @param options The settings which should be changed for the channel
*/
edit(options: TextChannelEditOptions) : Promise<TextChannel>;
/**
* Creates a new thread channe;
* @param options The settings for the thread channel
*/
createThread(options: CreateThreadOptions) : Promise<ThreadChannel>;
}
declare class ThreadChannel extends BaseChannel{
guild: Guild;
guildId: string;
name: string;
threadArchived: boolean;
archived?: Date | null;
archivedTimestamp?: number | null;
autoArchive?: number | null;
memberCount: number;
threadJoined: boolean;
threadJoinable: boolean;
editable: boolean;
locked: boolean;
sendable: boolean;
viewable: boolean;
manageable: boolean;
slowMode: number;
parentId?: string | null;
parent?: CategoryChannel | null | undefined;
messages: Save<string, Message>;
members: Save<string, Member>;
owner: Member;
/**
* Returns a boolean which defines whether the channel is archived or not
*/
isArchived() : boolean;
/**
* Deletes the thread channel
*/
delete() : Promise<void>;
/**
* Changes the name of the thread channel
* @param name The new name for the thread channel
* @param reason The reason to change the name
*/
setName(name: string, reason?: string) : Promise<ThreadChannel>;
/**
* Sends a message in this channel
* @param content The content of the message to send
*/
send(...content: [MessageContentType]) : Promise<Message>;
/**
* Updates the thread channel in case changes have been made to it
*/
update() : Promise<ThreadChannel>;
/**
* Get a message which was sent in this channel
* @param messageId The id of the message to get
*/
getMessage(messageId: string) : Promise<Message>;
/**
* Delete an amount of messages in this channel
* @param amount The amount of messages to delete, max 100 messages per time
* @param filter A function to filter the messages you'd like to delete from the cache
*/
deleteMessages(amount: number, filter: ({key, value} : {key: string; value: Message;}) => boolean) : Promise<void>;
/**
* Joins the thread channel if the bot isn't a participant already
*/
join() : Promise<ThreadChannel>;
/**
* Leaves the thread channel if the bot is a participant
*/
leave() : Promise<ThreadChannel>;
/**
* Pins the thread channel at the top of a forum channel (not possible for text channels)
* @param reason The reason to pin the thread channel
*/
pin(reason?: string) : Promise<ThreadChannel>;
/**
* Unpins the thread channel from the forum channel (not possible for text channels)
* @param reason The reason to unpin the thread channel
*/
unpin(reason?: string) : Promise<ThreadChannel>;
/**
* Sends a message to the thread channel
* @param content The content of the message
*/
send(...content: [MessageContentType]) : Promise<Message>;
/**
* Archives or unarchives the thread channel
* @param archived A boolean which defines whether the thread channel should be archived or not
* @param reason The reason to archive or unarchive the thread channel
*/
setArchived(archived?: boolean, reason?: string) : Promise<ThreadChannel>;
/**
* Changes the auto archive duration of the thread channel after no activity
* @param dateResolvable How long it should take before the channel should be archived automatically
* @param reason The reason to change the duration of the auto archivement
*/
setAutoArchive(dateResolvable: ResolvableDate, reason?: string) : Promise<ThreadChannel>;
/**
* Change the lock status of the thread channel
* @param locked A boolean which defines whether the thread channel should be locked or not
* @param reason The reason to lock or unlock the thread channel
*/
setLocked(locked?: boolean, reason?: string) : Promise<ThreadChannel>;
/**
* Sets a slow mode for this channel
* @param dateResolvable The slow mode for the channel in miliseconds
* @param reason The reason to change the slow mode for this channel
*/
setSlowMode(dateResolvable: ResolvableDate, reason?: string) : Promise<GuildChannel>;
/**
* Changes the settings of the thread channel
* @param options The settings you'd like to change in the thread channel
*/
edit(options: ThreadEditOptions) : Promise<ThreadChannel>;
}
declare class StageChannel extends GuildChannel{
joinable: boolean;
full: boolean;
rtcRegion: string;
bitrate: number;
userLimit: number;
videoQualityMode: VideoQualityModeType;
messages: Save<string, Message>;
members: Save<string, Member>;
/**
* Sends a message to the stage channel
* @param content The content of the message
*/
send(...content: [MessageContentType]) : Promise<Message>;
/**
* Updates the stage channel in case there were made changes to it
*/
update() : Promise<StageChannel>;
/**
* Delete an amount of messages in this channel
* @param amount The amount of messages to delete, max 100 messages per time
* @param filter A function to filter the messages you'd like to delete from the cache
*/
deleteMessages(amount: number, filter: ({key, value} : {key: string; value: Message;}) => boolean) : Promise<void>;
/**
* Changes the settings of the stage channel
* @param options The settings you'd like to change
*/
edit(options: VoiceChannelEditOptions) : Promise<StageChannel>;
/**
* Changes the stage channel region
* @param region The region you'd like to set the stage channel to
* @param reason The reason to change the stage channel region
*/
setRtcRegion(region: string, reason?: string) : Promise<StageChannel>;
/**
* Sets a limit on the amount of members which are allowed to join the stage channel
* @param limit The amount of members which are allowed to join (min 0, max 99)
* @param reason The reason to change the user limit
*/
setUserLimit(limit: number, reason?: string) : Promise<StageChannel>;
/**
* Changes the default video quality mode
* @param qualityMode The video quality mode you'd like to set
* @param reason The reason to change the video quality mode
*/
setVideoQuality(qualityMode: VideoQualityModeType, reason?: string) : Promise<StageChannel>;
/**
* Changes the bitrate of the stage channel and can improve or worsen the audio quality
* @param bitrate The bitrate you'd like to set
* @param reason The reason to change the bitrate
*/
setBitrate(bitrate: number, reason?: string) : Promise<StageChannel>;
}
declare class VoiceChannel extends GuildChannel{
joinable: boolean;
speakable: boolean;
full: boolean;
rtcRegion: string;
bitrate: number;
userLimit: number;
videoQuality: string;
members: Save<string, Member>;
messages: Save<string, Message>;
/**
* Sends a message to the voice channel
* @param content The content of the message
*/
send(...content: [MessageContentType]) : Promise<Message>;
/**
* Updates the voice channel in case there were made changes to it
*/
update() : Promise<VoiceChannel>;
/**
* Delete an amount of messages in this channel
* @param amount The amount of messages to delete, max 100 messages per time
* @param filter A function to filter the messages you'd like to delete from the cache
*/
deleteMessages(amount: number, filter: ({key, value} : {key: string; value: Message;}) => boolean) : Promise<void>;
/**
* Changes the settings of the voice channel
* @param options The settings you'd like to change
*/
edit(options: VoiceChannelEditOptions) : Promise<VoiceChannel>;
/**
* Changes the voice channel region
* @param region The region you'd like to set the voice channel to
* @param reason The reason to change the voice channel region
*/
setRtcRegion(region: string, reason?: string) : Promise<VoiceChannel>;
/**
* Sets a limit on the amount of members which are allowed to join the voice channel
* @param limit The amount of members which are allowed to join (min 0, max 99)
* @param reason The reason to change the user limit
*/
setUserLimit(limit: number, reason?: string) : Promise<VoiceChannel>;
/**
* Changes the default video quality mode
* @param qualityMode The video quality mode you'd like to set
* @param reason The reason to change the video quality mode
*/
setVideoQuality(qualityMode: VideoQualityModeType, reason?: string) : Promise<VoiceChannel>;
/**
* Changes the bitrate of the voice channel and can improve or worsen the audio quality
* @param bitrate The bitrate you'd like to set
* @param reason The reason to change the bitrate
*/
setBitrate(bitrate: number, reason?: string) : Promise<VoiceChannel>;
/**
* Plays a song in the voice channel
* @param stream The stream to play (YouTube url, stream url or instance of Readable stream)
*/
playSong(stream: string | Readable) : Promise<void>;
/**
* Disconnects from the voice channel if the bot is connected to it
*/
disconnect() : Promise<void>;
/**
* Gets the queue in the voice channel
*/
getQueue() : Promise<[{
title: string | null,
url: string | Readable
}]>;
/**
* Skips the song which is currently playing in the voice channel
*/
skipSong() : Promise<void>;
/**
* Pauses the song which is currently playing
*/
pauseSong() : Promise<void>;
/**
* Resumes the song which was paused
*/
resumeSong() : Promise<void>;
/**
* Shuffles the queue of the voice channel
*/
shuffle() : Promise<void>;
/**
* Loops the song which is currently being played
*/
setLoop() : Promise<void>;
/**
* Disables the loop if it was enabled;
*/
setUnloop() : Promise<void>;
/**
* Loops the whole queue
*/
setQueueloop() : Promise<void>;
/**