Table of Contents

Class MessageHelpers

Namespace
Fluxer.Net
Assembly
Fluxer.Net.dll

Http methods for Message class.

public static class MessageHelpers
Inheritance
object
MessageHelpers

Methods

AcknowledgeAsync(Message, MessageAckJson)

Acknowledge a message has been read for the current user.

public static Task AcknowledgeAsync(this Message message, MessageAckJson json)

Parameters

message Message
json MessageAckJson

Returns

Task

Remarks

User accounts only.

AddReactionAsync(Message, Emoji)

Add a reaction to a message.

public static Task AddReactionAsync(this Message message, Emoji emoji)

Parameters

message Message
emoji Emoji

Returns

Task

Remarks

Requires ViewChannel and AddReactions in a guild channel.

AddReactionAsync(Message, string)

Add a reaction to a message.

public static Task AddReactionAsync(this Message message, string emoji)

Parameters

message Message
emoji string

Returns

Task

Remarks

Requires ViewChannel and AddReactions in a guild channel.

DeleteAsync(Message)

Delete a message in a channel.

public static Task DeleteAsync(this Message message)

Parameters

message Message

Returns

Task

Remarks

Requires ViewChannel and ReadMessageHistory in a guild channel.
ManageMessages for other user message.

DeleteAttachmentAsync(Message, ulong)

Delete a attachment on a message.

public static Task DeleteAttachmentAsync(this Message message, ulong attachmentId)

Parameters

message Message
attachmentId ulong

Returns

Task

Remarks

Requires ViewChannel and ReadMessageHistory in a guild channel.

ForwardAsync(Message, Channel, MessageFlag, string?)

Forward a message to another channel.

public static Task<Message> ForwardAsync(this Message message, Channel channel, MessageFlag flags = MessageFlag.None, string? nonce = null)

Parameters

message Message
channel Channel
flags MessageFlag
nonce string

Returns

Task<Message>

Remarks

Requires ViewChannel and SendMessages in a guild channel.

GetReactionsForEmojiAsync(Message, Emoji)

Get reaction users for a certain emoji on a message.

public static Task<IEnumerable<User>> GetReactionsForEmojiAsync(this Message message, Emoji emoji)

Parameters

message Message
emoji Emoji

Returns

Task<IEnumerable<User>>

Remarks

Requires ViewChannel and ReadMessageHistory in a guild channel.

GetReactionsForEmojiAsync(Message, string)

Get reaction users for a certain emoji on a message.

public static Task<IEnumerable<User>> GetReactionsForEmojiAsync(this Message message, string emoji)

Parameters

message Message
emoji string

Returns

Task<IEnumerable<User>>

Remarks

Requires ViewChannel and ReadMessageHistory in a guild channel.

ModifyAsync(Message, string?, List<EmbedRequest>?, MessageReferenceRequest?, AllowedMentionsRequest?, MessageFlag, string?, ulong?, List<ulong>?, List<AttachmentRequest>?)

Modify your message in a channel

public static Task<Message> ModifyAsync(this Message message, string? content = null, List<EmbedRequest>? embeds = null, MessageReferenceRequest? reference = null, AllowedMentionsRequest? allowedMentions = null, MessageFlag flags = MessageFlag.None, string? nonce = null, ulong? favoriteMediaId = null, List<ulong>? stickerIds = null, List<AttachmentRequest>? attachments = null)

Parameters

message Message
content string
embeds List<EmbedRequest>
reference MessageReferenceRequest
allowedMentions AllowedMentionsRequest
flags MessageFlag
nonce string
favoriteMediaId ulong?
stickerIds List<ulong>
attachments List<AttachmentRequest>

Returns

Task<Message>

Remarks

Requires ViewChannel and ReadMessageHistory in a guild channel.

PinAsync(Message)

Pin a message in a channel.

public static Task PinAsync(this Message message)

Parameters

message Message

Returns

Task

Remarks

Requires ViewChannel, ReadMessageHistory and PinMessages in a guild channel.

RemoveAllReactionsAsync(Message)

Remove all reactions on a message.

public static Task RemoveAllReactionsAsync(this Message message)

Parameters

message Message

Returns

Task

Remarks

Requires ViewChannel, ReadMessageHistory and ManageMessages in a guild channel.

RemoveAllReactionsForEmojiAsync(Message, Emoji)

Remove all reactions for a specific emoji on a message.

public static Task RemoveAllReactionsForEmojiAsync(this Message message, Emoji emoji)

Parameters

message Message
emoji Emoji

Returns

Task

Remarks

Requires ViewChannel, ReadMessageHistory and ManageMessages in a guild channel.

RemoveAllReactionsForEmojiAsync(Message, string)

Remove all reactions for a specific emoji on a message.

public static Task RemoveAllReactionsForEmojiAsync(this Message message, string emoji)

Parameters

message Message
emoji string

Returns

Task

Remarks

Requires ViewChannel, ReadMessageHistory and ManageMessages in a guild channel.

RemoveOwnReactionAsync(Message, Emoji)

Remove a reaction on a message.

public static Task RemoveOwnReactionAsync(this Message message, Emoji emoji)

Parameters

message Message
emoji Emoji

Returns

Task

Remarks

Requires ViewChannel in a guild channel.

RemoveOwnReactionAsync(Message, string)

Remove a reaction on a message.

public static Task RemoveOwnReactionAsync(this Message message, string emoji)

Parameters

message Message
emoji string

Returns

Task

Remarks

Requires ViewChannel in a guild channel.

RemoveUserReactionAsync(Message, Emoji, User)

Remove a user's reaction on a message.

public static Task RemoveUserReactionAsync(this Message message, Emoji emoji, User user)

Parameters

message Message
emoji Emoji
user User

Returns

Task

Remarks

Requires ViewChannel, ReadMessageHistory and ManageMessages in a guild channel.

RemoveUserReactionAsync(Message, string, ulong)

Remove a user's reaction on a message.

public static Task RemoveUserReactionAsync(this Message message, string emoji, ulong userId)

Parameters

message Message
emoji string
userId ulong

Returns

Task

Remarks

Requires ViewChannel, ReadMessageHistory and ManageMessages in a guild channel.

ReplyAsync(Message, string?, List<EmbedRequest>?, AllowedMentionsRequest?, MessageFlag, string?, ulong?, bool?, List<ulong>?, List<AttachmentRequest>?)

Send a message in the channel.

public static Task<Message> ReplyAsync(this Message message, string? content = null, List<EmbedRequest>? embeds = null, AllowedMentionsRequest? allowedMentions = null, MessageFlag flags = MessageFlag.None, string? nonce = null, ulong? favoriteMediaId = null, bool? tts = null, List<ulong>? stickerIds = null, List<AttachmentRequest>? attachments = null)

Parameters

message Message
content string
embeds List<EmbedRequest>
allowedMentions AllowedMentionsRequest
flags MessageFlag
nonce string
favoriteMediaId ulong?
tts bool?
stickerIds List<ulong>
attachments List<AttachmentRequest>

Returns

Task<Message>

Remarks

Requires ViewChannel and SendMessages for guild channels.

SuppressEmbedsAsync(Message)

Hide embeds on a message.

public static Task<Message> SuppressEmbedsAsync(this Message message)

Parameters

message Message

Returns

Task<Message>

Remarks

Requires ViewChannel and ReadMessageHistory in a guild channel.

UnPinAsync(Message)

Remove a pinned message in a channel.

public static Task UnPinAsync(this Message message)

Parameters

message Message

Returns

Task

Remarks

Requires ViewChannel, ReadMessageHistory and PinMessages in a guild channel.