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

Webhook.send voice_message param #9459

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nmsturcke
Copy link
Contributor

Summary

Implement a voice_message field in Webhook.send that passes the MessageFlags.voice flag and converts the file sent into a voice message.

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

Additional Information

Although this same method is used for replying to Interactions, due to a known issue in the Discord API, message flags are dropped in webhooks that reply to command contexts. Nothing can be done about it, other than waiting for Discord to fix it.

Media

84Rm4
gSm8h

@nmsturcke nmsturcke changed the title Voice message Webhook.send voice_message param Jun 25, 2023
@grueyg
Copy link

grueyg commented Oct 12, 2023

You did a great job! By the way, how to let the bot send a voice message to a specific channel?

@nmsturcke
Copy link
Contributor Author

You did a great job! By the way, how to let the bot send a voice message to a specific channel?

Thanks! Bots can't currently send voice messages, only webhooks. So, if you're using my fork, you can create a webhook and use that to send a voice message.

@grueyg
Copy link

grueyg commented Oct 12, 2023

You did a great job! By the way, how to let the bot send a voice message to a specific channel?

Thanks! Bots can't currently send voice messages, only webhooks. So, if you're using my fork, you can create a webhook and use that to send a voice message.

Thank you for your reply! I am using your fork and found that the audio file sent by the webhook only appears as a voice message on the discord web page and desktop client, but is still an attachment on the mobile app. Is this the official update by discord to block this feature?

@nmsturcke
Copy link
Contributor Author

but is still an attachment on the mobile app

Oh.. My guess is the mobile app is just outdated (as per usual), but not sure.

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.

None yet

3 participants