mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 11:03:30 +01:00
refactor(Util.escapeMarkdown): allow separate escaping and add tests (#3241)
* wip refactor * add escapeMarkdown tests * italics can be done with a single underscore too * more refined * fix test name * unnecessary eslint ignores * use jest * make eslint less annoying in this test file * more testing * fix lib usage * more tests and a small fix
This commit is contained in:
10
typings/index.d.ts
vendored
10
typings/index.d.ts
vendored
@@ -1160,7 +1160,15 @@ declare module 'discord.js' {
|
||||
public static convertToBuffer(ab: ArrayBuffer | string): Buffer;
|
||||
public static delayFor(ms: number): Promise<void>;
|
||||
public static discordSort<K, V extends { rawPosition: number; id: string; }>(collection: Collection<K, V>): Collection<K, V>;
|
||||
public static escapeMarkdown(text: string, onlyCodeBlock?: boolean, onlyInlineCode?: boolean): string;
|
||||
public static escapeMarkdown(text: string, options?: { codeBlock?: boolean, inlineCode?: boolean, bold?: boolean, italic?: boolean, underline?: boolean, strikethrough?: boolean, spoiler?: boolean, inlineCodeContent?: boolean, codeBlockContent?: boolean }): string;
|
||||
public static escapeCodeBlock(text: string): string;
|
||||
public static escapeInlineCode(text: string): string;
|
||||
public static escapeBold(text: string): string;
|
||||
public static escapeItalic(text: string): string;
|
||||
public static escapeUnderline(text: string): string;
|
||||
public static escapeStrikethrough(text: string): string;
|
||||
public static escapeSpoiler(text: string): string;
|
||||
public static cleanCodeBlockContent(text: string): string;
|
||||
public static fetchRecommendedShards(token: string, guildsPerShard?: number): Promise<number>;
|
||||
public static flatten(obj: object, ...props: { [key: string]: boolean | string }[]): object;
|
||||
public static idToBinary(num: Snowflake): string;
|
||||
|
||||
Reference in New Issue
Block a user