updateScheduledMessage abstract method

  1. @MultiPart.new()
  2. @PATCH.new('/users/@me/scheduled-messages/{scheduled_message_id}')
Future<ScheduledMessageResponseSchema> updateScheduledMessage({
  1. @Path.new('scheduled_message_id') required String scheduledMessageId,
  2. @Part.new(name: 'scheduled_local_at') required String scheduledLocalAt,
  3. @Part.new(name: 'timezone') required String timezone,
  4. @Part.new(name: 'content') MessageContentRequest? content,
  5. @Part.new(name: 'embeds') List<RichEmbedRequest>? embeds,
  6. @Part.new(name: 'attachments') List<Object3>? attachments,
  7. @Part.new(name: 'message_reference') MessageReferenceRequest? messageReference,
  8. @Part.new(name: 'allowed_mentions') AllowedMentionsRequest? allowedMentions,
  9. @Part.new(name: 'flags') MessageFlags? flags,
  10. @Part.new(name: 'nonce') MessageNonceRequest? nonce,
  11. @Part.new(name: 'favorite_meme_id') SnowflakeType? favoriteMemeId,
  12. @Part.new(name: 'sticker_ids') List<SnowflakeType>? stickerIds,
  13. @Part.new(name: 'tts') bool? tts,
})

Update scheduled message.

Updates an existing scheduled message before it is sent. Can modify message content, scheduled time, and timezone. Returns updated scheduled message details.

scheduledMessageId - The scheduled message id.

content - Name not received - field will be skipped. Name not received - field will be skipped.

embeds - Array of embed objects to include in the message. Name not received - field will be skipped.

attachments - Array of attachment objects. Name not received - field will be skipped.

messageReference - Name not received - field will be skipped. Name not received - field will be skipped.

allowedMentions - Name not received - field will be skipped. Name not received - field will be skipped.

flags - Name not received - field will be skipped.

nonce - Name not received - field will be skipped.

favoriteMemeId - Name not received - field will be skipped. Name not received - field will be skipped.

stickerIds - Name not received - field will be skipped. Name not received - field will be skipped.

tts - Whether this is a text-to-speech message. Name not received - field will be skipped.

scheduledLocalAt - ISO 8601 timestamp expressed in the user local timezone for when the message should be delivered. Name not received - field will be skipped.

timezone - IANA timezone identifier the schedule_local_at value is anchored to. Name not received - field will be skipped.

Implementation

@MultiPart()
@PATCH('/users/@me/scheduled-messages/{scheduled_message_id}')
Future<ScheduledMessageResponseSchema> updateScheduledMessage({
  @Path('scheduled_message_id') required String scheduledMessageId,
  @Part(name: 'scheduled_local_at') required String scheduledLocalAt,
  @Part(name: 'timezone') required String timezone,
  @Part(name: 'content') MessageContentRequest? content,
  @Part(name: 'embeds') List<RichEmbedRequest>? embeds,
  @Part(name: 'attachments') List<Object3>? attachments,
  @Part(name: 'message_reference') MessageReferenceRequest? messageReference,
  @Part(name: 'allowed_mentions') AllowedMentionsRequest? allowedMentions,
  @Part(name: 'flags') MessageFlags? flags,
  @Part(name: 'nonce') MessageNonceRequest? nonce,
  @Part(name: 'favorite_meme_id') SnowflakeType? favoriteMemeId,
  @Part(name: 'sticker_ids') List<SnowflakeType>? stickerIds,
  @Part(name: 'tts') bool? tts,
});