timeout
Sets the timeout on this component, invalidating the component on expiration, and running the given timeout handler.
Note: Components inside groups cannot have timeouts.
Timeout cancellation
The timeout will be canceled once a component has been deleted, including if the component was set to a single use.
Component deletion
If the component is a group, then all of its owned components will also be deleted.
If the component is inside a group, then all the group's components will also be deleted.
Captured entities
Pay extra attention to not capture JDA entities in such handlers as they can stop being updated by JDA.
Parameters
The duration before timeout
The handler to run when the button is clicked
Sets the timeout on this component, invalidating the component on expiration, and running the given timeout handler.
Note: Components inside groups cannot have timeouts.
Timeout cancellation
The timeout will be canceled once a component has been deleted, including if the component was set to a single use.
Component deletion
If the component is a group, then all of its owned components will also be deleted.
If the component is inside a group, then all the group's components will also be deleted.
Captured entities
Pay extra attention to not capture JDA entities in such handlers as they can stop being updated by JDA.
Parameters
The value of the timeout
The unit of the timeout
The handler to run when the button is clicked
Sets the timeout on this component, invalidating the component on expiration, and running the given timeout handler.
Note: Components inside groups cannot have timeouts.
Timeout cancellation
The timeout will be canceled once a component has been deleted, including if the component was set to a single use.
Component deletion
If the component is a group, then all of its owned components will also be deleted.
If the component is inside a group, then all the group's components will also be deleted.
Captured entities
Pay extra attention to not capture JDA entities in such handlers as they can stop being updated by JDA.
You can still use User.ref and such from JDA-KTX to attenuate this issue, even though it will return you an outdated object if the entity cannot be found anymore.
Parameters
The duration of the timeout
The handler to run when the button is clicked