mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 11:03:30 +01:00
feat(Collectors): make collectors auto-stop when relevant structures are deleted (#3632)
* Collectors: make Collectors automatically stop when Channel, Guild, or Message are deleted. * fix potential error with DM collectors * Message collectors dont have a `this.message` you dummy * Fix(various): nitpicks, documentation, typings, and stray error * Pleasing mr tslint * fix: typings * Grammatical fixes Co-Authored-By: SpaceEEC <spaceeec@yahoo.com> * Fixing the linting after space's suggestions * docs(ReactionCollector): remove whitespace Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
This commit is contained in:
7
typings/index.d.ts
vendored
7
typings/index.d.ts
vendored
@@ -1023,6 +1023,9 @@ declare module 'discord.js' {
|
||||
|
||||
export class MessageCollector extends Collector<Snowflake, Message> {
|
||||
constructor(channel: TextChannel | DMChannel, filter: CollectorFilter, options?: MessageCollectorOptions);
|
||||
private _handleChannelDeletion(channel: GuildChannel): void;
|
||||
private _handleGuildDeletion(guild: Guild): void;
|
||||
|
||||
public channel: Channel;
|
||||
public options: MessageCollectorOptions;
|
||||
public received: number;
|
||||
@@ -1153,6 +1156,10 @@ declare module 'discord.js' {
|
||||
|
||||
export class ReactionCollector extends Collector<Snowflake, MessageReaction> {
|
||||
constructor(message: Message, filter: CollectorFilter, options?: ReactionCollectorOptions);
|
||||
private _handleChannelDeletion(channel: GuildChannel): void;
|
||||
private _handleGuildDeletion(guild: Guild): void;
|
||||
private _handleMessageDeletion(message: Message): void;
|
||||
|
||||
public message: Message;
|
||||
public options: ReactionCollectorOptions;
|
||||
public total: number;
|
||||
|
||||
Reference in New Issue
Block a user