Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(discord): support sending voice messages #264

Merged
merged 5 commits into from
Apr 20, 2024
Merged

Conversation

idranme
Copy link
Contributor

@idranme idranme commented Apr 18, 2024

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Apr 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.93%. Comparing base (e5825f1) to head (a506201).
Report is 33 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #264      +/-   ##
==========================================
+ Coverage   86.88%   86.93%   +0.04%     
==========================================
  Files           1        1              
  Lines         549      551       +2     
  Branches      111      112       +1     
==========================================
+ Hits          477      479       +2     
  Misses         72       72              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@idranme idranme changed the title feat: send voice message feat(telegram): send voice message Apr 18, 2024
adapters/discord/src/message.ts Outdated Show resolved Hide resolved
adapters/discord/src/message.ts Outdated Show resolved Hide resolved
adapters/discord/src/message.ts Outdated Show resolved Hide resolved
content: '',
attachments: [
{
waveform: '', // base64 encoded bytearray representing a sampled waveform
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the waveform be required here to be calculated from the wave ?

From Discord's doc:

The waveform is intended to be a preview of the entire voice message, with 1 byte per datapoint encoded in base64. Clients sample the recording at most once per 100 milliseconds, but will downsample so that no more than 256 datapoints are in the waveform.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is also possible to send without calculation.

idranme and others added 2 commits April 19, 2024 19:17
Co-authored-by: Maiko Sinkyaet Tan <maiko.tan.coding@gmail.com>
@idranme idranme changed the title feat(telegram): send voice message feat(discord): support sending voice messages Apr 19, 2024
@idranme idranme requested a review from MaikoTan April 19, 2024 12:05
@idranme
Copy link
Contributor Author

idranme commented Apr 19, 2024

3f5fc1d3f80e015f85f90ce2c5ac357a
Tested on local.

@shigma shigma merged commit df3ba5a into satorijs:master Apr 20, 2024
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants