createMessage method
Future<Message>
createMessage(
- String channelId, {
- required String content,
- String? nonce,
- bool tts = false,
- Embed? embed,
- AllowedMentions? allowedMentions,
- MessageReference? messageReference,
Implementation
Future<Message> createMessage(
String channelId, {
required String content,
String? nonce,
bool tts = false,
Embed? embed,
AllowedMentions? allowedMentions,
MessageReference? messageReference,
}) {
var endpoint = '/channels/$channelId/messages';
return _http.request(
endpoint,
converter: Message.fromJson,
method: 'post',
body: {
'content': content,
'nonce': nonce,
'embed': embed,
'allowed_mentions': allowedMentions,
'message_reference': messageReference,
},
);
}