Class WebhookManagerImpl
java.lang.Object
net.dv8tion.jda.internal.requests.RestActionImpl<Void>
net.dv8tion.jda.internal.requests.restaction.AuditableRestActionImpl<Void>
net.dv8tion.jda.internal.managers.ManagerBase<WebhookManager>
net.dv8tion.jda.internal.managers.WebhookManagerImpl
- All Implemented Interfaces:
Manager<WebhookManager>
,WebhookManager
,RestAction<Void>
,AuditableRestAction<Void>
-
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.WebhookManager
AVATAR, CHANNEL, NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe targetWebhook
that will be modified by this managerreset()
Resets all fields for this Managerreset
(long fields) Resets the fields specified by the provided bit-flag pattern.reset
(long... fields) Resets the fields specified by the provided bit-flag patterns.Sets the default avatar of the selectedWebhook
.setChannel
(TextChannel channel) Sets theTextChannel
of the selectedWebhook
.Sets the default name of the selectedWebhook
.Methods inherited from class net.dv8tion.jda.internal.managers.ManagerBase
complete, deadline, isPermissionChecksEnabled, queue, 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.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.WebhookManager
getChannel, getGuild
-
Constructor Details
-
WebhookManagerImpl
Creates a new WebhookManager instance- Parameters:
webhook
- The targetWebhook
to modify
-
-
Method Details
-
getWebhook
Description copied from interface:WebhookManager
The targetWebhook
that will be modified by this manager- Specified by:
getWebhook
in interfaceWebhookManager
- Returns:
- The target
Webhook
-
reset
Description copied from interface:WebhookManager
Resets the fields specified by the provided bit-flag pattern. You can specify a combination by using a bitwise OR concat of the flag constants.
Example:manager.reset(WebhookManager.CHANNEL | WebhookManager.NAME);
Flag Constants:
- Specified by:
reset
in interfaceManager<WebhookManager>
- Specified by:
reset
in interfaceWebhookManager
- Overrides:
reset
in classManagerBase<WebhookManager>
- Parameters:
fields
- Integer value containing the flags to reset.- Returns:
- WebhookManager for chaining convenience
-
reset
Description copied from interface:WebhookManager
Resets the fields specified by the provided bit-flag patterns.
Example:manager.reset(WebhookManager.CHANNEL, WebhookManager.NAME);
Flag Constants:
- Specified by:
reset
in interfaceManager<WebhookManager>
- Specified by:
reset
in interfaceWebhookManager
- Overrides:
reset
in classManagerBase<WebhookManager>
- Parameters:
fields
- Integer values containing the flags to reset.- Returns:
- WebhookManager for chaining convenience
-
reset
Description copied from interface:Manager
Resets all fields for this Manager- Specified by:
reset
in interfaceManager<WebhookManager>
- Overrides:
reset
in classManagerBase<WebhookManager>
- Returns:
- The current Manager with all settings reset to default
-
setName
Description copied from interface:WebhookManager
Sets the default name of the selectedWebhook
.A webhook name must not be
null
or blank!- Specified by:
setName
in interfaceWebhookManager
- Parameters:
name
- The new default name for the selectedWebhook
- Returns:
- WebhookManager for chaining convenience
-
setAvatar
Description copied from interface:WebhookManager
Sets the default avatar of the selectedWebhook
.- Specified by:
setAvatar
in interfaceWebhookManager
- Parameters:
icon
- The new default avatarIcon
for the selectedWebhook
ornull
to reset- Returns:
- WebhookManager for chaining convenience
-
setChannel
Description copied from interface:WebhookManager
Sets theTextChannel
of the selectedWebhook
.A webhook channel must not be
null
and must be in the sameGuild
!- Specified by:
setChannel
in interfaceWebhookManager
- Parameters:
channel
- The newTextChannel
for the selectedWebhook
- Returns:
- WebhookManager for chaining convenience
-