Table of Contents

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

opCode GatewayOpCode

The opcode to send to the Discord gateway.

data object

The data to serialize.

guildId ulong

The 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.