feat: Voice Message docs

This commit is contained in:
Elysia 2023-05-27 16:34:15 +07:00
parent b75688ee28
commit b815c8b3c2
3 changed files with 18 additions and 5 deletions

View File

@ -1,7 +1,19 @@
# Quick Links:
- [Interaction](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/Message.md#interaction)
- [Embed](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/Message.md#messageembed-)
- [Slash command demo](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/SlashCommand.md)
## Voice Message
```js
const channel = client.channels.cache.get('cid');
const attachment = new Discord.MessageAttachment(
'./test.mp3', // path file
'test.ogg', // must be .ogg
{
waveform: '=',
duration_secs: 1, // any number you want
},
);
channel.send({
files: [attachment],
flags: 'IS_VOICE_MESSAGE',
});
```
## Interaction
<details open>

File diff suppressed because one or more lines are too long

View File

@ -42,6 +42,7 @@ class MessagePayload {
* @property {Buffer|string|Stream} attachment The original attachment that generated this file
* @property {string} name The name of this file
* @property {Buffer|Stream} file The file to be sent to the API
* @extends {APIAttachment}
*/
/**