Skip to content

Commit

Permalink
Update message.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
idranme committed Apr 19, 2024
1 parent a506201 commit 63c0ded
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adapters/discord/src/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,11 @@ export class DiscordMessageEncoder<C extends Context = Context> extends MessageE
attachments: [
{
waveform: '', // base64 encoded bytearray representing a sampled waveform
id: '0',
id: 0,
duration_secs: attrs.duration ?? 0,
},
],
flags: 1 << 13, // https://discord.com/developers/docs/resources/channel#message-object-message-flags
flags: Message.Flag.IS_VOICE_MESSAGE,
})
this.buffer = ''
} else if (type === 'author') {
Expand Down
4 changes: 4 additions & 0 deletions adapters/discord/src/types/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ export namespace Message {
LOADING = 1 << 7,
/** this message failed to mention some roles and add their members to the thread */
FAILED_TO_MENTION_SOME_ROLES_IN_THREAD = 1 << 8,
/** this message will not trigger push and desktop notifications */
SUPPRESS_NOTIFICATIONS = 1 << 12,
/** this message is a voice message */
IS_VOICE_MESSAGE = 1 << 13,
}

/** https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure */
Expand Down

0 comments on commit 63c0ded

Please sign in to comment.