mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 13:03:31 +01:00
refactor(Message): accept a single object instead of 3 arguments (#6244)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
This commit is contained in:
17
typings/index.d.ts
vendored
17
typings/index.d.ts
vendored
@@ -1031,11 +1031,7 @@ export class Message extends Base {
|
||||
public react(emoji: EmojiIdentifierResolvable): Promise<MessageReaction>;
|
||||
public removeAttachments(): Promise<Message>;
|
||||
public reply(options: string | MessagePayload | ReplyMessageOptions): Promise<Message>;
|
||||
public startThread(
|
||||
name: string,
|
||||
autoArchiveDuration: ThreadAutoArchiveDuration,
|
||||
reason?: string,
|
||||
): Promise<ThreadChannel>;
|
||||
public startThread(options: StartThreadOptions): Promise<ThreadChannel>;
|
||||
public suppressEmbeds(suppress?: boolean): Promise<Message>;
|
||||
public toJSON(): unknown;
|
||||
public toString(): string;
|
||||
@@ -4278,6 +4274,12 @@ export interface StaticImageURLOptions {
|
||||
|
||||
export type StageInstanceResolvable = StageInstance | Snowflake;
|
||||
|
||||
export interface StartThreadOptions {
|
||||
name: string;
|
||||
autoArchiveDuration: ThreadAutoArchiveDuration;
|
||||
reason?: string;
|
||||
}
|
||||
|
||||
export type Status = number;
|
||||
|
||||
export type StickerFormatType = keyof typeof StickerFormatTypes;
|
||||
@@ -4325,12 +4327,9 @@ export type ThreadChannelResolvable = ThreadChannel | Snowflake;
|
||||
|
||||
export type ThreadChannelTypes = 'GUILD_NEWS_THREAD' | 'GUILD_PUBLIC_THREAD' | 'GUILD_PRIVATE_THREAD';
|
||||
|
||||
export interface ThreadCreateOptions<AllowedThreadType> {
|
||||
name: string;
|
||||
autoArchiveDuration: ThreadAutoArchiveDuration;
|
||||
export interface ThreadCreateOptions<AllowedThreadType> extends StartThreadOptions {
|
||||
startMessage?: MessageResolvable;
|
||||
type?: AllowedThreadType;
|
||||
reason?: string;
|
||||
}
|
||||
|
||||
export interface ThreadEditData {
|
||||
|
||||
Reference in New Issue
Block a user