mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +01:00
feat(Message|TextChannel): Inline replies (#4874)
* feat(Message): remove reply functionality * feat(InlineReplies): add INLINE_REPLY constant/typing * feat(InlineReplies): add Message#replyReference property * feat(InlineReplies): add typings for sending inline replies * feat(InlineReplies): provide support for inline-replying to messages * feat(Message): add referencedMessage getter * fix: check that Message#reference is defined in referencedMessage * refactor(InlineReplies): rename property, rework Message resolution * docs: update jsdoc for inline replies * feat(Message): inline reply method * fix(ApiMessage): finish renaming replyTo * fix: jsdocs for Message#referencedMessage Co-authored-by: Tristan Guichaoua <33934311+tguichaoua@users.noreply.github.com> * fix: restore reply typings * fix: dont pass channel_id to API when replying * chore: update jsdocs * chore: more jsdoc updates * feat(AllowedMentions): add typings for replied_user * fix: naming conventions * fix(Message): referenced_message is null, not undefined * fix(MessageMentionOptions): repliedUser should be optional * chore: get this back to the right state * fix(ApiMessage): pass allowed_mentions when replying without content * fix(ApiMessage): prevent mutation of client options Co-authored-by: almostSouji <timoqueezle@gmail.com> Co-authored-by: Tristan Guichaoua <33934311+tguichaoua@users.noreply.github.com>
This commit is contained in:
7
typings/index.d.ts
vendored
7
typings/index.d.ts
vendored
@@ -987,6 +987,7 @@ declare module 'discord.js' {
|
||||
public webhookID: Snowflake | null;
|
||||
public flags: Readonly<MessageFlags>;
|
||||
public reference: MessageReference | null;
|
||||
public readonly referencedMessage: Message | null;
|
||||
public awaitReactions(
|
||||
filter: CollectorFilter,
|
||||
options?: AwaitReactionsOptions,
|
||||
@@ -2826,6 +2827,7 @@ declare module 'discord.js' {
|
||||
parse?: MessageMentionTypes[];
|
||||
roles?: Snowflake[];
|
||||
users?: Snowflake[];
|
||||
repliedUser?: boolean;
|
||||
}
|
||||
|
||||
type MessageMentionTypes = 'roles' | 'users' | 'everyone';
|
||||
@@ -2840,7 +2842,7 @@ declare module 'discord.js' {
|
||||
files?: (FileOptions | BufferResolvable | Stream | MessageAttachment)[];
|
||||
code?: string | boolean;
|
||||
split?: boolean | SplitOptions;
|
||||
reply?: UserResolvable;
|
||||
replyTo?: MessageResolvable;
|
||||
}
|
||||
|
||||
type MessageReactionResolvable = MessageReaction | Snowflake;
|
||||
@@ -2870,7 +2872,8 @@ declare module 'discord.js' {
|
||||
| 'USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3'
|
||||
| 'CHANNEL_FOLLOW_ADD'
|
||||
| 'GUILD_DISCOVERY_DISQUALIFIED'
|
||||
| 'GUILD_DISCOVERY_REQUALIFIED';
|
||||
| 'GUILD_DISCOVERY_REQUALIFIED'
|
||||
| 'REPLY';
|
||||
|
||||
interface OverwriteData {
|
||||
allow?: PermissionResolvable;
|
||||
|
||||
Reference in New Issue
Block a user