Table of Contents

Class RestInteractionMessage

Namespace
Discord.Rest
Assembly
Discord.Net.Rest.dll

Represents the initial REST-based response to an interaction.

public class RestInteractionMessage : RestUserMessage, IUpdateable, IUserMessage, IMessage, ISnowflakeEntity, IEntity<ulong>, IDeletable
Inheritance
RestInteractionMessage
Implements
Inherited Members
Extension Methods

Properties

ResponseType

public InteractionResponseType ResponseType { get; }

Property Value

InteractionResponseType

Methods

DeleteAsync()

Deletes this object and all of its children.

public Task DeleteAsync()

Returns

Task

A task that represents the asynchronous delete operation.

ModifyAsync(Action<MessageProperties>, RequestOptions)

Modifies this interaction response

public Task ModifyAsync(Action<MessageProperties> func, RequestOptions options = null)

Parameters

func Action<MessageProperties>

A delegate containing the properties to modify the message with.

options RequestOptions

The options to be used when sending the request.

Returns

Task

A task that represents the asynchronous modification operation.

Examples

The following example replaces the content of the message with Hello World!.

await msg.ModifyAsync(x => x.Content = "Hello World!");

Remarks

This method modifies this message with the specified properties. To see an example of this method and what properties are available, please refer to MessageProperties.

Exceptions

InvalidOperationException

The token used to modify/delete this message expired.

HttpException

Something went wrong during the request.