Class RestInteractionMessage
Represents the initial REST-based response to an interaction.
Implements
Inherited Members
Namespace: Discord.Rest
Assembly: Discord.Net.Rest.dll
Syntax
public class RestInteractionMessage : RestUserMessage, IEntity<ulong>, IUpdateable, IUserMessage, IMessage, ISnowflakeEntity, IEntity<ulong>, IDeletable
Properties
| Improve this Doc View SourceResponseType
Declaration
public InteractionResponseType ResponseType { get; }
Property Value
Type | Description |
---|---|
InteractionResponseType |
Methods
| Improve this Doc View SourceDeleteAsync()
Deletes this object and all of its children.
Declaration
public Task DeleteAsync()
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous delete operation. |
ModifyAsync(Action<MessageProperties>, RequestOptions)
Modifies this interaction response
Declaration
public async Task ModifyAsync(Action<MessageProperties> func, RequestOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
Action<MessageProperties> | func | A delegate containing the properties to modify the message with. |
RequestOptions | options | The options to be used when sending the request. |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous modification operation. |
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.
Examples
The following example replaces the content of the message with Hello World!
.
await msg.ModifyAsync(x => x.Content = "Hello World!");
Exceptions
Type | Condition |
---|---|
HttpException | Something went wrong during the request. |