API reference
Method AddVoiceMessage
- Namespace
- DisCatSharp.Experimental.Entities
- Assembly
- DisCatSharp.Experimental.dll
AddVoiceMessage<T>(T, string, float, byte[], string?)
Adds a manual voice message attachment to the T.
Make sure to use T.AddFile before using this.
public static T AddVoiceMessage<T>(this T builder, string filename, float durationSeconds, byte[] waveform, string? description = null) where T : DisCatSharpBuilder
Parameters
builderTThe
Tto add the attachment to.filenamestringThe original filename of the attachment.
durationSecondsfloatThe duration of the voice message in seconds.
waveformbyte[]A byte-array representing the waveform data for the voice message.
descriptionstringAn optional description for the attachment.
Returns
- T
The chained
T.
Type Parameters
TThe builder type.