/** * @file Public helper functions/types */ import { GuildPluginData } from "./plugins/PluginData"; import { Client, GuildMember, Invite, Message, TextBasedChannelFields, TextChannel } from "discord.js"; /** * Splits a string into chunks, preferring to split at newlines if possible */ export declare function splitIntoCleanChunks(str: string, maxChunkLength?: number): string[]; /** * Splits a message into chunks that fit into Discord's message length limit (2000) while also retaining leading and * trailing line breaks, open code blocks, etc. between chunks */ export declare function splitMessageIntoChunks(str: string, chunkLength?: number): string[]; /** * Sends a message to the specified channel, splitting it into multiple shorter messages if the message text goes over * the Discord message length limit (2000) */ export declare function createChunkedMessage(channel: TextBasedChannelFields, messageText: string): Promise; /** * Returns a promise that resolves when the specified channel gets a new message, optionally restricted to a message by * a specific user only */ export declare function waitForReply(client: Client, channel: TextChannel, restrictToUserId?: string, timeout?: number): Promise; /** * Disables link previews in the string by wrapping detected links in < and > */ export declare function disableLinkPreviews(str: string): string; /** * Deactivates user/role mentions in the string by adding an invisible unicode char after each @-character */ export declare function deactivateMentions(str: string): string; /** * Disables code blocks in the string by adding an invisible unicode char after each backtick */ export declare function disableCodeBlocks(str: string): string; /** * Returns the full invite link for an invite object */ export declare function getInviteLink(inv: Invite): string; export declare function hasPermission(config: unknown, permission: string): boolean; export declare function getMemberLevel(pluginData: GuildPluginData, member: GuildMember): number; export { userMentionRegex, channelMentionRegex, roleMentionRegex, snowflakeRegex } from "./utils";