Updated README.md

This commit is contained in:
Lechner Julian - FrauJulian
2025-10-10 18:01:10 +02:00
parent 20438ee041
commit 36bfd035e9
+23 -30
View File
@@ -20,6 +20,7 @@ Please create an [issue](https://github.com/FrauJulian/DiscordAudioStreamNPM/iss
> **Supported package managers:** npm, yarn, pnpm, bun > **Supported package managers:** npm, yarn, pnpm, bun
#### Recommended: #### Recommended:
```bash ```bash
npm install discord-audio-stream @snazzah/davey @discordjs/opus npm install discord-audio-stream @snazzah/davey @discordjs/opus
yarn add discord-audio-stream @snazzah/davey @discordjs/opus yarn add discord-audio-stream @snazzah/davey @discordjs/opus
@@ -77,7 +78,7 @@ let audioManager = new AudioManager(
#### Properties #### Properties
| Callable with | Type | Description | | Callable with | Type | Description |
| ----------------- | ---------------------------- | ----------------------------------------------- | |-------------------|------------------------------|-------------------------------------------------|
| `VoiceConnection` | **VoiceConnection** | VoiceConnection instance from discord.js/voice. | | `VoiceConnection` | **VoiceConnection** | VoiceConnection instance from discord.js/voice. |
| `AudioPlayer` | **AudioPlayer** | AudioPlayer instance from discord.js/voice. | | `AudioPlayer` | **AudioPlayer** | AudioPlayer instance from discord.js/voice. |
| `AudioResource` | **AudioResource** | AudioResource instance from discord.js/voice. | | `AudioResource` | **AudioResource** | AudioResource instance from discord.js/voice. |
@@ -86,42 +87,34 @@ let audioManager = new AudioManager(
#### Methods #### Methods
| Callable with | Parameters | Return type | Description | | Callable with | Parameters | Return type | Description | |
| ------------------------------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------- | -------------------------------------- | |--------------------------------|---------------------------------------------------------|-------------|---------------------------------------------------------------|----------------------------------------|
| `OverrideVoiceConnectionData` | `connectionData` (type of **VoiceConnectionDataModel**) | void | Method to override global connectionData variable. | | `OverrideVoiceConnectionData` | `connectionData` (type of **VoiceConnectionDataModel**) | void | Method to override global connectionData variable. | |
| `OverrideVoiceAudioDataModel` | `audioData` (type of **VoiceAudioDataModel**) | void | Method to override global audioData variable. | | `OverrideVoiceAudioDataModel` | `audioData` (type of **VoiceAudioDataModel**) | void | Method to override global audioData variable. | |
| `OverrideRenewInMs` | `renewInMs` (type of int, default value is 5400000) | void | Method to override global renewInMs variable. | | `OverrideRenewInMs` | `renewInMs` (type of int, default value is 5400000) | void | Method to override global renewInMs variable. | |
| `CreateConnection` | `isRenew` (type of boolean, default value is false) | void | Method to join the voice connection. | | `CreateConnection` | `isRenew` (type of boolean, default value is false) | void | Method to join the voice connection. | |
| `PlayAudioOnConnection` | | void | Method to play audio on the existing voice connection. | | `PlayAudioOnConnection` | | void | Method to play audio on the existing voice connection. | |
| `PauseAudio` | | void | Method to pause the audio. | | `PauseAudio` | | void | Method to pause the audio. | |
| `ResumeAudio` | | void | Method to resume the audio. | | `ResumeAudio` | | void | Method to resume the audio. | |
| `StopAudioOnConnection` | | void | Method to stop the audio without destroying voice connection. | | `StopAudioOnConnection` | | void | Method to stop the audio without destroying voice connection. | |
| `CreateConnectionAndPlayAudio` | | void | Method to join the voice connection and play audio. | | `CreateConnectionAndPlayAudio` | | void | Method to join the voice connection and play audio. | |
| `DestroyConnection` | | void | Method to destroy the voice connection. | | `DestroyConnection` | | void | Method to destroy the voice connection. | |
| `Dispose` | | void | Dispose all data in object. | | `Dispose` | | void | Dispose all data in object. | |
| `SetVolume` | `volume` (type of number, 0 - 100 percent) | void | Method to set the audio volume. | Method to set the volume of the audio. | | `SetVolume` | `volume` (type of number, 0 - 100 percent) | void | Method to set the audio volume. | Method to set the volume of the audio. |
| `SetMaxListeners` | `maxListeners` (type of number) | void | Method to set the max listeners of the audio stream. | | `SetMaxListeners` | `maxListeners` (type of number) | void | Method to set the max listeners of the audio stream. | |
##### Types History ##### Types History
- [**VoiceConnection - [**VoiceConnection** by discord.js/voice](https://github.com/discordjs/discord.js/blob/main/packages/voice/src/VoiceConnection.ts#L166)
** by discord.js/voice](https://github.com/discordjs/discord.js/blob/main/packages/voice/src/VoiceConnection.ts#L166) - [**AudioPlayer** by discord.js/voice](https://github.com/discordjs/discord.js/blob/main/packages/voice/src/audio/AudioPlayer.ts#L155)
- [**AudioPlayer - [**AudioResource** by discord.js/voice](https://github.com/discordjs/discord.js/blob/main/packages/voice/src/audio/AudioResource.ts#L44)
** by discord.js/voice](https://github.com/discordjs/discord.js/blob/main/packages/voice/src/audio/AudioPlayer.ts#L155) - [**VoiceConnectionDataModel** by discord-audio-stream](https://github.com/FrauJulian/Discord-Audio-Stream/blob/main/src/Models/VoiceConnectionDataModel.d.ts#L3)
- [**AudioResource - [**VoiceAudioDataModel** by discord-audio-stream](https://github.com/FrauJulian/Discord-Audio-Stream/blob/main/src/Models/VoiceAudioDataModel.d.ts#L1)
** by discord.js/voice](https://github.com/discordjs/discord.js/blob/main/packages/voice/src/audio/AudioResource.ts#L44)
- [**VoiceConnectionDataModel
**](https://github.com/FrauJulian/Discord-Audio-Stream/blob/main/src/Models/VoiceConnectionDataModel.d.ts#L3) (custom
type)
- [**VoiceAudioDataModel
**](https://github.com/FrauJulian/Discord-Audio-Stream/blob/main/src/Models/VoiceAudioDataModel.d.ts#L1) (custom type)
## 📋 Credits: ## 📋 Contributors:
~ [**FrauJulian**](https://fraujulian.xyz/). ~ [**FrauJulian - Julian Lechner**](https://fraujulian.xyz/).
## 🤝 Enjoy the package? ## 🤝 Enjoy the package?
Give it a star ⭐ on [github](https://github.com/FrauJulian/discord-audio-stream)! Give it a star ⭐ on [github](https://github.com/FrauJulian/discord-audio-stream)!
### Greetings from Austria! ⛰️