UNPKG

@wilcosp/rex

Version:

Rex is an automated command manager for discord js

46 lines (45 loc) 1.6 kB
/*! * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ import { EmbedBuilder, JSONEncodable } from "discord.js"; import { APIEmbed } from "discord-api-types/v10"; export declare class RexEmbed extends EmbedBuilder { /** * set the footer text without adding change/adding a icon * @param text * @returns */ setFooterText(text: string): this; static limits: { readonly title: 256; readonly description: 4096; readonly field: { readonly title: 256; readonly value: 1024; readonly max: 25; }; readonly footer: 2048; readonly author: { readonly name: 256; }; readonly combinedSum: 6000; readonly embedsPerMessage: 10; }; /** * get combined sum of all characters in a embed * @returns */ combinedSum(): number; /** * chop a string that has a splitter (like one from String.join(splitter)) so that it can be used in Embeds * @param txt the text that needs to be chopped * @param splitter the splitter that needs to be used * @param maxLength the max length each string in the return string[] can have * @returns string[] */ static chopString(txt: string, splitter: string, maxLength: number): string[]; static splitEmbeds(embeds: RexEmbed[]): RexEmbed[][]; static from(embed: JSONEncodable<APIEmbed> | APIEmbed): RexEmbed; }