Interface WebhookMessageCreateAction<T>
- All Superinterfaces:
FluentRestAction<T,
,WebhookMessageCreateAction<T>> MessageCreateRequest<WebhookMessageCreateAction<T>>
,MessageData
,MessageRequest<WebhookMessageCreateAction<T>>
,RestAction<T>
public interface WebhookMessageCreateAction<T>
extends MessageCreateRequest<WebhookMessageCreateAction<T>>, FluentRestAction<T,WebhookMessageCreateAction<T>>
Extension of a default
RestAction
that allows setting message information before sending!
This is available as return type of all sendMessage/sendFile methods in WebhookClient
.
When this RestAction has been executed all provided files will be closed.
Note that the garbage collector also frees opened file streams when it finalizes the stream object.
- Since:
- 4.3.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionsetEphemeral
(boolean ephemeral) Set whether this message should be visible to other users.Methods inherited from interface net.dv8tion.jda.api.requests.FluentRestAction
addCheck, deadline, setCheck, timeout
Methods inherited from interface net.dv8tion.jda.api.utils.messages.MessageCreateRequest
addActionRow, addActionRow, addComponents, addComponents, addContent, addEmbeds, addEmbeds, addFiles, addFiles, applyData, applyEditData, applyMessage, getAttachments, setTTS
Methods inherited from interface net.dv8tion.jda.api.utils.messages.MessageData
getAllowedMentions, getComponents, getContent, getEmbeds, getMentionedRoles, getMentionedUsers, isMentionRepliedUser, isSuppressEmbeds
Methods inherited from interface net.dv8tion.jda.api.utils.messages.MessageRequest
mention, mention, mentionRepliedUser, mentionRoles, mentionRoles, mentionRoles, mentionUsers, mentionUsers, mentionUsers, setActionRow, setActionRow, setAllowedMentions, setComponents, setComponents, setContent, setEmbeds, setEmbeds, setFiles, setFiles, setSuppressEmbeds
Methods inherited from interface net.dv8tion.jda.api.requests.RestAction
and, and, complete, complete, completeAfter, delay, delay, delay, delay, flatMap, flatMap, getCheck, getJDA, map, mapToResult, onErrorFlatMap, onErrorFlatMap, onErrorMap, onErrorMap, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, submit, submit, submitAfter, submitAfter, zip
-
Method Details
-
setEphemeral
Set whether this message should be visible to other users.
When a message is ephemeral, it will only be visible to the user that used the interaction.Ephemeral messages have some limitations and will be removed once the user restarts their client.
Limitations:- Cannot be deleted by the bot
- Cannot contain any files/attachments
- Cannot be reacted to
- Cannot be retrieved
This only works on
InteractionHooks
!- Parameters:
ephemeral
- True, if this message should be invisible for other users- Returns:
- The same message action, for chaining convenience
-