MessageCreateAction¶
Inherits: MessageAction < DiscordRESTAction < Reference < Object
Inherited By: InteractionFollowupCreateAction, InteractionMessageCreateAction
Description¶
Message action to send a message to a channel.
Methods¶
| return type | signature |
|---|---|
| Message | submit ( ) coroutine |
| MessageCreateAction | set_tts ( bool value ) |
| MessageCreateAction | reply_to ( int message_id, bool fail_on_error=true ) |
| MessageCreateAction | add_sticker ( int sticker_id ) |
Constants¶
-
int MAX_STICKERS = 3
Maxiumum number of stickers in a message.
Method Descriptions¶
-
MessageCreateAction MessageCreateAction ( DiscordRESTMediator rest, int channel_id )
Constructs a new
MessageCreateActioninstance.
-
Message submit ( ) coroutine
Sends the message.
-
MessageCreateAction set_tts ( bool value )
Enables/Disables TTS (Text To Speach) to the message.
falseby default.
-
MessageCreateAction reply_to ( int message_id, bool fail_on_error=true )
References a message by
message_idto reply to. Whenfail_on_erroristruethe action fails if the referenced message does not exist.
-
MessageCreateAction add_sticker ( int sticker_id )
Attach a sticker to the message.