import { Snowflake } from 'discord.js'; import { TextChannelLike } from '../types'; /** * Return the text cut if length is above `maxLength` arg and add `endTextIfTooLong` at the end. * * @param text - The text to cut if it is too long. * @param maxLength - The maximum length required. * @param endTextIfTooLong - The end text to add if it is too long. * @returns - The text, cut if it was too long. */ export declare function cutIfTooLong(text: string, maxLength: number, endTextIfTooLong?: string): string; /** * Get a key from a value from an Object. * * @typeParam O - The object type. * @param object - The object to get key from. * @param value - The value. * @returns - The key of the object if found, else undefined. */ export declare function getKeyByValue(object: O, value: O[keyof O]): keyof O | undefined; /** * Test if the ID is in the {@link CommandHandler.owners}. * * @param id - The ID of the user to debug. * @returns - Is the user an owner. */ export declare function isOwner(id: Snowflake): boolean; /** * Returns true if the value looks like a Snowflake. * * @remarks There is no way to identify at 100% if the value is veritable snowflake of something. * @returns - Is the value a Snowflake. */ export declare function isSnowflake(value: string): value is Snowflake; /** * Returns true if the value is a TextChannel or a NewsChannel. * * @param value - The value you want to test. * @returns - Is the value a TextChannelLike. */ export declare function isTextChannelLike(value: any): value is TextChannelLike; /** * Returns a random value from an array. * * @typeParam T - The array type. * @param array - The array to get a random value from. * @returns - A random value from the array. */ export declare function random(array: T[]): T;