mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-28 06:20:11 +00:00
feat: add support for voice messages (#749)
Co-authored-by: advaith <advaithj1@gmail.com>
This commit is contained in:
@@ -59,6 +59,7 @@ export const PermissionFlagsBits = {
|
||||
* @unstable This permission flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
*/
|
||||
UseExternalSounds: 1n << 45n,
|
||||
SendVoiceMessages: 1n << 46n,
|
||||
} as const;
|
||||
|
||||
/**
|
||||
|
||||
@@ -807,7 +807,7 @@ export enum MessageFlags {
|
||||
*/
|
||||
SuppressNotifications = 1 << 12,
|
||||
/**
|
||||
* @unstable This message flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
* This message is a voice message
|
||||
*/
|
||||
IsVoiceMessage = 1 << 13,
|
||||
}
|
||||
@@ -1321,6 +1321,14 @@ export interface APIAttachment {
|
||||
* Whether this attachment is ephemeral
|
||||
*/
|
||||
ephemeral?: boolean;
|
||||
/**
|
||||
* The duration of the audio file (currently for voice messages)
|
||||
*/
|
||||
duration_secs?: number;
|
||||
/**
|
||||
* Base64 encoded bytearray representing a sampled waveform (currently for voice messages)
|
||||
*/
|
||||
waveform?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -793,7 +793,7 @@ export enum MessageFlags {
|
||||
*/
|
||||
SuppressNotifications = 1 << 12,
|
||||
/**
|
||||
* @unstable This message flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
* This message is a voice message
|
||||
*/
|
||||
IsVoiceMessage = 1 << 13,
|
||||
}
|
||||
@@ -1289,6 +1289,14 @@ export interface APIAttachment {
|
||||
* Whether this attachment is ephemeral
|
||||
*/
|
||||
ephemeral?: boolean;
|
||||
/**
|
||||
* The duration of the audio file (currently for voice messages)
|
||||
*/
|
||||
duration_secs?: number;
|
||||
/**
|
||||
* Base64 encoded bytearray representing a sampled waveform (currently for voice messages)
|
||||
*/
|
||||
waveform?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -232,7 +232,13 @@ export enum RESTJSONErrorCodes {
|
||||
CannotConvertBetweenPremiumEmojiAndNormalEmoji,
|
||||
UploadedFileNotFound,
|
||||
|
||||
CannotDeleteGuildSubscriptionIntegration = 50163,
|
||||
VoiceMessagesDoNotSupportAdditionalContent = 50159,
|
||||
VoiceMessagesMustHaveASingleAudioAttachment,
|
||||
VoiceMessagesMustHaveSupportingMetadata,
|
||||
VoiceMessagesCannotBeEdited,
|
||||
CannotDeleteGuildSubscriptionIntegration,
|
||||
|
||||
YouCannotSendVoiceMessagesInThisChannel = 50173,
|
||||
|
||||
YouDoNotHavePermissionToSendThisSticker = 50600,
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@ export const PermissionFlagsBits = {
|
||||
* @unstable This permission flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
*/
|
||||
UseExternalSounds: 1n << 45n,
|
||||
SendVoiceMessages: 1n << 46n,
|
||||
} as const;
|
||||
|
||||
/**
|
||||
|
||||
@@ -807,7 +807,7 @@ export enum MessageFlags {
|
||||
*/
|
||||
SuppressNotifications = 1 << 12,
|
||||
/**
|
||||
* @unstable This message flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
* This message is a voice message
|
||||
*/
|
||||
IsVoiceMessage = 1 << 13,
|
||||
}
|
||||
@@ -1321,6 +1321,14 @@ export interface APIAttachment {
|
||||
* Whether this attachment is ephemeral
|
||||
*/
|
||||
ephemeral?: boolean;
|
||||
/**
|
||||
* The duration of the audio file (currently for voice messages)
|
||||
*/
|
||||
duration_secs?: number;
|
||||
/**
|
||||
* Base64 encoded bytearray representing a sampled waveform (currently for voice messages)
|
||||
*/
|
||||
waveform?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -793,7 +793,7 @@ export enum MessageFlags {
|
||||
*/
|
||||
SuppressNotifications = 1 << 12,
|
||||
/**
|
||||
* @unstable This message flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
* This message is a voice message
|
||||
*/
|
||||
IsVoiceMessage = 1 << 13,
|
||||
}
|
||||
@@ -1289,6 +1289,14 @@ export interface APIAttachment {
|
||||
* Whether this attachment is ephemeral
|
||||
*/
|
||||
ephemeral?: boolean;
|
||||
/**
|
||||
* The duration of the audio file (currently for voice messages)
|
||||
*/
|
||||
duration_secs?: number;
|
||||
/**
|
||||
* Base64 encoded bytearray representing a sampled waveform (currently for voice messages)
|
||||
*/
|
||||
waveform?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -232,7 +232,13 @@ export enum RESTJSONErrorCodes {
|
||||
CannotConvertBetweenPremiumEmojiAndNormalEmoji,
|
||||
UploadedFileNotFound,
|
||||
|
||||
CannotDeleteGuildSubscriptionIntegration = 50163,
|
||||
VoiceMessagesDoNotSupportAdditionalContent = 50159,
|
||||
VoiceMessagesMustHaveASingleAudioAttachment,
|
||||
VoiceMessagesMustHaveSupportingMetadata,
|
||||
VoiceMessagesCannotBeEdited,
|
||||
CannotDeleteGuildSubscriptionIntegration,
|
||||
|
||||
YouCannotSendVoiceMessagesInThisChannel = 50173,
|
||||
|
||||
YouDoNotHavePermissionToSendThisSticker = 50600,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user