edit method
Future<Message?>
edit({
- String? content,
- List<
EmbedBuilder> ? embeds, - List<
RowBuilder> ? components, - bool? tts,
Implementation
Future<Message?> edit ({ String? content, List<EmbedBuilder>? embeds, List<RowBuilder>? components, bool? tts }) async {
Response response = await ioc.use<HttpService>().patch(
url: '/channels/${channel.id}/messages/$id',
payload: {
'content': content,
'embeds': embeds,
'flags': flags,
'allowed_mentions': allowMentions,
'components': components,
}
);
return response.statusCode == 200
? Message.from(channel: channel, payload: jsonDecode(response.body))
: null;
}