Table of Contents

Method SendPayloadAsync

Namespace
DSharpPlus
Assembly
DSharpPlus.dll

SendPayloadAsync<T>(GatewayOpCode, T)

Sends a raw payload to the gateway. This method is not recommended for use unless you know what you're doing.

[Obsolete("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.")]
public Task SendPayloadAsync<T>(GatewayOpCode opCode, T data)

Parameters

opCode GatewayOpCode

The opcode to send to the Discord gateway.

data T

The data to deserialize.

Returns

Task

A task representing the payload being sent.

Type Parameters

T

The type of data that the object belongs to.

SendPayloadAsync(GatewayOpCode, object?)

Sends a raw payload to the gateway. This method is not recommended for use unless you know what you're doing.

[Obsolete("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.")]
public Task SendPayloadAsync(GatewayOpCode opCode, object? data = null)

Parameters

opCode GatewayOpCode

The opcode to send to the Discord gateway.

data object

The data to deserialize.

Returns

Task

A task representing the payload being sent.