Class ScheduledEventManagerImpl
java.lang.Object
net.dv8tion.jda.internal.requests.RestActionImpl<Void>
net.dv8tion.jda.internal.requests.restaction.AuditableRestActionImpl<Void>
net.dv8tion.jda.internal.managers.ManagerBase<ScheduledEventManager>
net.dv8tion.jda.internal.managers.ScheduledEventManagerImpl
- All Implemented Interfaces:
Manager<ScheduledEventManager>
,ScheduledEventManager
,RestAction<Void>
,AuditableRestAction<Void>
public class ScheduledEventManagerImpl
extends ManagerBase<ScheduledEventManager>
implements ScheduledEventManager
-
Field Summary
Fields inherited from class net.dv8tion.jda.internal.requests.RestActionImpl
LOG
Fields inherited from interface net.dv8tion.jda.api.requests.restaction.AuditableRestAction
MAX_REASON_LENGTH
Fields inherited from interface net.dv8tion.jda.api.managers.ScheduledEventManager
DESCRIPTION, END_TIME, IMAGE, LOCATION, NAME, START_TIME, STATUS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe targetScheduledEvent
for this managersetDescription
(String description) Sets the description of the selectedScheduledEvent
.setEndTime
(TemporalAccessor endTime) Sets the time that the selectedScheduledEvent
should end at.Sets the cover image for the newScheduledEvent
.setLocation
(String location) Sets the location of the selectedScheduledEvent
to take place externally, or not in a specificGuildChannel
.setLocation
(GuildChannel channel) Sets the location of the selectedScheduledEvent
to take place in the specifiedGuildChannel
.Sets the name of the selectedScheduledEvent
setStartTime
(TemporalAccessor startTime) Sets the time that the selectedScheduledEvent
should start at.setStatus
(ScheduledEvent.Status newStatus) Sets the status of the event.Methods inherited from class net.dv8tion.jda.internal.managers.ManagerBase
complete, deadline, isPermissionChecksEnabled, queue, reset, reset, reset, setCheck, setPermissionChecksEnabled, timeout
Methods inherited from class net.dv8tion.jda.internal.requests.restaction.AuditableRestActionImpl
reason
Methods inherited from class net.dv8tion.jda.internal.requests.RestActionImpl
getCheck, getDefaultFailure, getDefaultSuccess, getDefaultTimeout, getJDA, handleResponse, isPassContext, priority, setDefaultFailure, setDefaultSuccess, setDefaultTimeout, setErrorMapper, setPassContext, submit
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.dv8tion.jda.api.requests.restaction.AuditableRestAction
reason
Methods inherited from interface net.dv8tion.jda.api.managers.Manager
deadline, reset, setCheck, timeout
Methods inherited from interface net.dv8tion.jda.api.requests.RestAction
addCheck, and, and, complete, complete, completeAfter, delay, delay, delay, delay, flatMap, flatMap, getCheck, getJDA, map, mapToResult, onErrorFlatMap, onErrorFlatMap, onErrorMap, onErrorMap, onSuccess, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, submit, submit, submitAfter, submitAfter, zip
Methods inherited from interface net.dv8tion.jda.api.managers.ScheduledEventManager
getGuild, reset, reset
-
Constructor Details
-
ScheduledEventManagerImpl
-
-
Method Details
-
getScheduledEvent
Description copied from interface:ScheduledEventManager
The targetScheduledEvent
for this manager- Specified by:
getScheduledEvent
in interfaceScheduledEventManager
-
setName
Description copied from interface:ScheduledEventManager
Sets the name of the selectedScheduledEvent
- Specified by:
setName
in interfaceScheduledEventManager
- Parameters:
name
- The new name for the selectedScheduledEvent
- Returns:
- ScheduledEventManager for chaining convenience
-
setDescription
Description copied from interface:ScheduledEventManager
Sets the description of the selectedScheduledEvent
. This field may include markdown.- Specified by:
setDescription
in interfaceScheduledEventManager
- Parameters:
description
- The new description for the selectedScheduledEvent
, ornull
to reset the description- Returns:
- ScheduledEventManager for chaining convenience
-
setImage
Description copied from interface:ScheduledEventManager
Sets the cover image for the newScheduledEvent
.- Specified by:
setImage
in interfaceScheduledEventManager
- Parameters:
icon
- The cover image for the newScheduledEvent
, ornull
for no cover image.- Returns:
- ScheduledEventManager for chaining convenience
-
setLocation
Description copied from interface:ScheduledEventManager
Sets the location of the selectedScheduledEvent
to take place in the specifiedGuildChannel
.This will change the event's type to
ScheduledEvent.Type.STAGE_INSTANCE
orScheduledEvent.Type.VOICE
, which are the only supported channel types for the location of scheduled events currently.- Specified by:
setLocation
in interfaceScheduledEventManager
- Parameters:
channel
- TheGuildChannel
that the selectedScheduledEvent
is set to take place in.- Returns:
- ScheduledEventManager for chaining convenience
-
setLocation
Description copied from interface:ScheduledEventManager
Sets the location of the selectedScheduledEvent
to take place externally, or not in a specificGuildChannel
. Please note that an event is required to have an end time set if the location is external.This will change the event's type to
ScheduledEvent.Type.EXTERNAL
- Specified by:
setLocation
in interfaceScheduledEventManager
- Parameters:
location
- The location that the selectedScheduledEvent
is set to take place at.- Returns:
- ScheduledEventManager for chaining convenience
- See Also:
-
setStartTime
Description copied from interface:ScheduledEventManager
Sets the time that the selectedScheduledEvent
should start at. Events ofType.EXTERNAL
will automatically start at this time. Events ofType.STAGE_INSTANCE
andType.VOICE
need to be manually started. If theScheduledEvent
has not begun after its scheduled start time, it will be automatically cancelled after a few hours.- Specified by:
setStartTime
in interfaceScheduledEventManager
- Parameters:
startTime
- The time that the selectedScheduledEvent
is set to start at.- Returns:
- ScheduledEventManager for chaining convenience
- See Also:
-
setEndTime
Description copied from interface:ScheduledEventManager
Sets the time that the selectedScheduledEvent
should end at. Events ofType.EXTERNAL
will automatically end at this time, and events ofType.STAGE_INSTANCE
andType.VOICE
will end a few minutes after the last person has left the channel.- Specified by:
setEndTime
in interfaceScheduledEventManager
- Parameters:
endTime
- The time that the selectedScheduledEvent
is set to end at.- Returns:
- ScheduledEventManager for chaining convenience
- See Also:
-
setStatus
Description copied from interface:ScheduledEventManager
Sets the status of the event. This method may be used to start, end or cancel an event but can only be used to complete one of the following transitions:- Specified by:
setStatus
in interfaceScheduledEventManager
- Parameters:
newStatus
- The new status- Returns:
- ScheduledEventManager for chaining convenience
- See Also:
-