updateReply method
Future<Interaction>
updateReply({
- String? content,
- List<
EmbedBuilder> ? embeds, - ComponentBuilder? components,
- List<
AttachmentBuilder> ? attachments,
Edit original response to interaction
Example :
await interaction.updateReply(content: 'Hello ${interaction.user.username}');
Implementation
Future<Interaction> updateReply ({ String? content, List<EmbedBuilder>? embeds, ComponentBuilder? components, List<AttachmentBuilder>? attachments }) async {
dynamic messagePayload = MessageParser(content, embeds, components, attachments, null).toJson();
String mid = message?.id ?? "@original";
await ioc.use<DiscordApiHttpService>().patch(url: "/webhooks/$applicationId/$token/messages/$mid")
.files(messagePayload['files'])
.payload(messagePayload['payload'])
.build();
return this;
}