feat: voice messages

#9444 djs
This commit is contained in:
Elysia
2023-04-25 18:18:55 +07:00
parent ebf9e6f3ea
commit 30457a0e81
6 changed files with 47 additions and 7 deletions

13
typings/index.d.ts vendored
View File

@@ -2157,6 +2157,7 @@ export class MessageAttachment {
public attachment: BufferResolvable | Stream;
public contentType: string | null;
public description: string | null;
public duration: number | null;
public ephemeral: boolean;
public height: number | null;
public id: Snowflake;
@@ -2165,6 +2166,7 @@ export class MessageAttachment {
public size: number;
public readonly spoiler: boolean;
public url: string;
public waveform: string | null;
public width: number | null;
public setDescription(description: string): this;
public setFile(attachment: BufferResolvable | Stream, name?: string): this;
@@ -4671,6 +4673,11 @@ export interface APIErrors {
INSUFFICIENT_BOOSTS: 50101;
INVALID_JSON: 50109;
CANNOT_MIX_SUBSCRIPTION_AND_NON_SUBSCRIPTION_ROLES_FOR_EMOJI: 50144;
VOICE_MESSAGES_DO_NOT_SUPPORT_ADDITIONAL_CONTENT: 50159;
VOICE_MESSAGES_MUST_HAVE_A_SINGLE_AUDIO_ATTACHMENT: 50160;
VOICE_MESSAGES_MUST_HAVE_SUPPORTING_METADATA: 50161;
VOICE_MESSAGES_CANNOT_BE_EDITED: 50162;
YOU_CANNOT_SEND_VOICE_MESSAGES_IN_THIS_CHANNEL: 50173;
CANNOT_CONVERT_PREMIUM_EMOJI_TO_NORMAL_EMOJI: 50145;
TWO_FACTOR_REQUIRED: 60003;
INVALID_TWO_FACTOR_CODE: 60008;
@@ -6807,7 +6814,8 @@ export type MessageFlagsString =
| 'EPHEMERAL'
| 'LOADING'
| 'FAILED_TO_MENTION_SOME_ROLES_IN_THREAD'
| 'SUPPRESS_NOTIFICATIONS';
| 'SUPPRESS_NOTIFICATIONS'
| 'IS_VOICE_MESSAGE';
export interface MessageInteraction {
id: Snowflake;
@@ -7023,7 +7031,8 @@ export type PermissionString =
| 'MODERATE_MEMBERS'
| 'MANAGE_EVENTS'
| 'VIEW_CREATOR_MONETIZATION_ANALYTICS'
| 'USE_SOUNDBOARD';
| 'USE_SOUNDBOARD'
| 'SEND_VOICE_MESSAGES';
export type RecursiveArray<T> = ReadonlyArray<T | RecursiveArray<T>>;