Method SendPayloadAsync
- Namespace
- DSharpPlus
- Assembly
- DSharpPlus.dll
SendPayloadAsync(GatewayOpCode, object?, ulong)
Sends a raw payload to the gateway. This method is not recommended for use unless you know what you're doing.
public Task SendPayloadAsync(GatewayOpCode opCode, object? data, ulong guildId)
Parameters
opCodeGatewayOpCodeThe opcode to send to the Discord gateway.
dataobjectThe data to serialize.
guildIdulongThe guild this payload originates from. Pass 0 for shard-independent payloads.
Returns
- Task
A task representing the payload being sent.
Remarks
This method should not be used unless you know what you're doing. Instead, look towards the other explicitly implemented methods which come with client-side validation.