import { Collection, Message, TextChannel } from "discord.js"; import { PrismaClient } from "@prisma/client"; import { BaseEntry, BaseGuildCache } from "../"; /** * A class that assists in the cleaning of a Discord TextChannel. */ export default class ChannelCleaner
> {
/**
* The GuildCache of the channel's Guild
*/
private readonly cache;
/**
* The id of the Channel to clean
*/
private readonly channelId;
/**
* The only messages that should be in the Channel
*/
private readonly messageIds;
private excluded;
private channel?;
private readonly messages;
constructor(
/**
* The GuildCache of the channel's Guild
*/
cache: GC,
/**
* The id of the Channel to clean
*/
channelId: string,
/**
* The only messages that should be in the Channel
*/
messageIds: string[]);
/**
* Set a filter to remove messages that meet a condition.
* TRUE if excluding message from deletion
*
* @param excluded Filter
*/
setExcluded(excluded: (message: Message) => boolean): this;
/**
* Begins the cleaning of the channel
*/
clean(): Promise