Table of Contents

Method TryGet

Namespace
DSharpPlus
Assembly
DSharpPlus.dll

TryGet(ulong, out DiscordMessage?)

Try to get a DiscordMessage object associated with the message ID from the cache.

bool TryGet(ulong messageId, out DiscordMessage? message)

Parameters

messageId ulong

The ID of the message to retrieve from the cache.

message DiscordMessage

The DiscordMessage object retrieved from the cache, if it exists; null otherwise.

Returns

bool

true if the message can be retrieved from the cache, false otherwise.