mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
feat: replace disableEveryone with disableMentions (#3830)
* add ClientOptions#disableMentions and MessageOptions#disableMentions * provide tests * don't sanitize controlled mentions * add @here mentions to tests * fix indents (6 spaces instead of 8) * add Util#cleanContent tests * add typings for removeMentions * replace @ with @\u200b AFTER cleaning content as suggested instead of using removeMentions * better explanation of this option * no newline in Util.removeMentions * fix long line * remove double space * remove comments (change has been reverted) * Use Util.removeMentions to remove mentions * use Util.removeMentions in Util.cleanContent
This commit is contained in:
7
typings/index.d.ts
vendored
7
typings/index.d.ts
vendored
@@ -1427,6 +1427,7 @@ declare module 'discord.js' {
|
||||
public static basename(path: string, ext?: string): string;
|
||||
public static binaryToID(num: string): Snowflake;
|
||||
public static cleanContent(str: string, message: Message): string;
|
||||
public static removeMentions(str: string): string;
|
||||
public static cloneObject(obj: object): object;
|
||||
public static convertToBuffer(ab: ArrayBuffer | string): Buffer;
|
||||
public static delayFor(ms: number): Promise<void>;
|
||||
@@ -2068,7 +2069,7 @@ declare module 'discord.js' {
|
||||
messageCacheLifetime?: number;
|
||||
messageSweepInterval?: number;
|
||||
fetchAllMembers?: boolean;
|
||||
disableEveryone?: boolean;
|
||||
disableMentions?: boolean;
|
||||
partials?: PartialTypes[];
|
||||
restWsBridgeTimeout?: number;
|
||||
restTimeOffset?: number;
|
||||
@@ -2464,7 +2465,7 @@ declare module 'discord.js' {
|
||||
nonce?: string;
|
||||
content?: string;
|
||||
embed?: MessageEmbed | MessageEmbedOptions;
|
||||
disableEveryone?: boolean;
|
||||
disableMentions?: boolean;
|
||||
files?: (FileOptions | BufferResolvable | Stream | MessageAttachment)[];
|
||||
code?: string | boolean;
|
||||
split?: boolean | SplitOptions;
|
||||
@@ -2693,7 +2694,7 @@ declare module 'discord.js' {
|
||||
tts?: boolean;
|
||||
nonce?: string;
|
||||
embeds?: (MessageEmbed | object)[];
|
||||
disableEveryone?: boolean;
|
||||
disableMentions?: boolean;
|
||||
files?: (FileOptions | BufferResolvable | Stream | MessageAttachment)[];
|
||||
code?: string | boolean;
|
||||
split?: boolean | SplitOptions;
|
||||
|
||||
Reference in New Issue
Block a user