import { Channel, Emoji, Guild, GuildMember, Message, Role, User } from 'discord.js'; import { Command, TextChannelLike } from '../'; export declare enum DataType { CHANNEL = "channel", COMMAND = "command", EMOTE = "emote", GUILD = "guild", MEMBER = "member", MESSAGE = "message", ROLE = "role", TEXT_CHANNEL = "text_channel", USER = "user" } declare type DataTypeResolver = T | Lowercase; /** * Finds a {@link https://discord.js/#/docs/main/stable/class/Channel | Channel} from the text, or the message content and returns null if nothing found. * It can find it from ID/name/mention. * * @param dataType - Channel {@link DataType.CHANNEL}. * @param text - A string or a Message to find dataType from. * @returns - The Channel or null if not found. */ export declare function getThing(dataType: DataTypeResolver, text: string | Message): Promise; /** * Finds a {@link Command} from the text, or the message content and returns null if nothing found. * It can find it from the name/alias. * * @param dataType - Command {@link DataType.COMMAND}. * @param text - A string or a Message to find dataType from. * @returns - The Command or null if not found. */ export declare function getThing(dataType: DataTypeResolver, text: string | Message): Promise; /** * Finds an {@link https://discord.js.org/#/docs/main/stable/class/Emoji | Emoji} from the text, or the message content and returns null if nothing found. * It can find it from the name/emoji itself/ID. * * @param dataType - Emote {@link DataType.EMOTE}. * @param text - A string or a Message to find dataType from. * @returns - The Emoji or null if not found. */ export declare function getThing(dataType: DataTypeResolver, text: string | Message): Promise; /** * Finds a {@link https://discord.js.org/#/docs/main/stable/class/Guild | Guild} from the text, or the message content and returns null if nothing found. * It can find it from the name/ID. * * @param dataType - Guild {@link DataType.GUILD}. * @param text - A string or a Message to find dataType from. * @returns - The Guild or null if not found. */ export declare function getThing(dataType: DataTypeResolver, text: string | Message): Promise; /** * Finds a {@link https://discord.js.org/#/docs/main/stable/class/GuildMember | GuildMember} from the text, or the message content and returns null if nothing found. * It can find it from the username/ID/mention/nickname. * * @param dataType - Member {@link DataType.MEMBER}. * @param text - A string or a Message to find dataType from. * @returns - The Guild or null if not found. */ export declare function getThing(dataType: DataTypeResolver, text: string | Message): Promise; /** * Finds a {@link https://discord.js.org/#/docs/main/stable/class/Message | Message} from the text, or the message content and returns null if nothing found. * It can find it from the name/ID/link. * * @param dataType - Message {@link DataType.MESSAGE}. * @param text - A string or a Message to find dataType from. * @returns - The Message or null if not found. */ export declare function getThing(dataType: DataTypeResolver, text: string | Message): Promise; /** * Finds a {@link https://discord.js.org/#/docs/main/stable/class/Role | Role} from the text, or the message content and returns null if nothing found. * It can find it from the name/ID/mention, if a message is provided, it will fetch the last 100 messages and search in it. * * @param dataType - Role {@link DataType.ROLE}. * @param text - A string or a Message to find dataType from. * @returns - The Role or null if not found. */ export declare function getThing(dataType: DataTypeResolver, text: string | Message): Promise; /** * Finds a {@link https://discord.js/#/docs/main/stable/class/TextChannel | TextChannel} or a {@link https://discord.js/#/docs/main/stable/class/NewsChannel | NewsChannel} from the text, or the message content and returns null if nothing found. * It can find it from ID/name/mention. * * @param dataType - TextChannel | NewsChannel {@link DataType.TEXT_CHANNEL}. * @param text - A string or a Message to find dataType from. * @returns - The Channel or null if not found. */ export declare function getThing(dataType: DataTypeResolver, text: string | Message): Promise; /** * Finds a {@link https://discord.js.org/#/docs/main/stable/class/User | User} from the text, or the message content and returns null if nothing found.
* It can find it from the username/ID. * * @param dataType - User {@link DataType.USER}. * @param text - A string or a Message to find dataType from. * @returns - The User or null if not found. */ export declare function getThing(dataType: DataTypeResolver, text: string | Message): Promise; export {};