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. You should instead make a variable from the entity's ID, outside the lambda, then capture it.
Parameters
The duration before timeout
The handler to run when the component expires
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 should instead make a variable from the entity's ID, outside the lambda, then capture it.
Parameters
The value of the timeout
The unit of the timeout
The handler to run when the component expires
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 should instead make a variable from the entity's ID, outside the lambda, then capture it.
Parameters
The duration of the timeout
The handler to run when the component expires