Interface IWebhookContainerMixin<T extends IWebhookContainerMixin<T>>
- All Superinterfaces:
Channel
,ChannelMixin<T>
,ChannelUnion
,Comparable<GuildChannel>
,Formattable
,GuildChannel
,GuildChannelMixin<T>
,GuildChannelUnion
,IDetachableEntity
,IDetachableEntityMixin
,IMentionable
,ISnowflake
,IWebhookContainer
,IWebhookContainerUnion
- All Known Subinterfaces:
ForumChannelMixin<T>
,MediaChannelMixin<T>
,NewsChannelMixin<T>
,StageChannelMixin<T>
,StandardGuildMessageChannelMixin<T>
,TextChannelMixin<T>
,VoiceChannelMixin<T>
- All Known Implementing Classes:
AbstractStandardGuildMessageChannelImpl
,DetachedForumChannelImpl
,DetachedMediaChannelImpl
,DetachedNewsChannelImpl
,DetachedStageChannelImpl
,DetachedTextChannelImpl
,DetachedVoiceChannelImpl
,ForumChannelImpl
,MediaChannelImpl
,NewsChannelImpl
,StageChannelImpl
,TextChannelImpl
,VoiceChannelImpl
public interface IWebhookContainerMixin<T extends IWebhookContainerMixin<T>>
extends IWebhookContainer, IWebhookContainerUnion, GuildChannelMixin<T>
-
Field Summary
Fields inherited from interface net.dv8tion.jda.api.entities.channel.Channel
MAX_NAME_LENGTH
Fields inherited from interface net.dv8tion.jda.api.entities.channel.middleman.GuildChannel
JUMP_URL
-
Method Summary
Modifier and TypeMethodDescriptiondefault WebhookAction
createWebhook
(String name) Creates a newWebhook
.default AuditableRestAction
<Void> Deletes aWebhook
attached to this channel by theid
specified.default RestAction
<List<Webhook>> Retrieves theWebhooks
attached to this channel.Methods inherited from interface net.dv8tion.jda.api.entities.channel.Channel
formatTo, getAsMention, getFlags, getJDA, getName, getType
Methods inherited from interface net.dv8tion.jda.internal.entities.channel.mixin.ChannelMixin
setName
Methods inherited from interface net.dv8tion.jda.api.entities.channel.unions.ChannelUnion
asAudioChannel, asCategory, asForumChannel, asGroupChannel, asGuildChannel, asGuildMessageChannel, asMediaChannel, asMessageChannel, asNewsChannel, asPrivateChannel, asStageChannel, asStandardGuildChannel, asStandardGuildMessageChannel, asTextChannel, asThreadChannel, asThreadContainer, asVoiceChannel
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface net.dv8tion.jda.api.entities.channel.middleman.GuildChannel
getGuild, getJumpUrl, getManager, getPermissionContainer
Methods inherited from interface net.dv8tion.jda.internal.entities.channel.mixin.middleman.GuildChannelMixin
checkCanAccess, checkCanManage, checkPermission, checkPermission, delete, hasPermission
Methods inherited from interface net.dv8tion.jda.api.entities.channel.unions.GuildChannelUnion
asAudioChannel, asCategory, asForumChannel, asGuildMessageChannel, asMediaChannel, asNewsChannel, asStageChannel, asStandardGuildChannel, asStandardGuildMessageChannel, asTextChannel, asThreadChannel, asThreadContainer, asVoiceChannel
Methods inherited from interface net.dv8tion.jda.api.entities.detached.IDetachableEntity
isDetached
Methods inherited from interface net.dv8tion.jda.internal.entities.detached.mixin.IDetachableEntityMixin
checkAttached, detachedException, detachedRequiresChannelException
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
Methods inherited from interface net.dv8tion.jda.api.entities.channel.unions.IWebhookContainerUnion
asAudioChannel, asForumChannel, asGuildMessageChannel, asMediaChannel, asNewsChannel, asStageChannel, asStandardGuildChannel, asStandardGuildMessageChannel, asTextChannel, asThreadContainer, asVoiceChannel
-
Method Details
-
retrieveWebhooks
Description copied from interface:IWebhookContainer
Retrieves theWebhooks
attached to this channel.Possible ErrorResponses include:
UNKNOWN_CHANNEL
if this channel was deletedMISSING_ACCESS
if we were removed from the guild
- Specified by:
retrieveWebhooks
in interfaceIWebhookContainer
- Returns:
RestAction
- Type: List<Webhook
>
Retrieved an immutable list of Webhooks attached to this channel
-
createWebhook
Description copied from interface:IWebhookContainer
Creates a newWebhook
.Possible
ErrorResponses
caused by the returnedRestAction
include the following:MISSING_PERMISSIONS
The webhook could not be created due to a permission discrepancyMISSING_ACCESS
TheVIEW_CHANNEL
permission was removedMAX_WEBHOOKS
If the channel already has reached the maximum capacity for webhooks
- Specified by:
createWebhook
in interfaceIWebhookContainer
- Parameters:
name
- The default name for the new Webhook.- Returns:
- A specific
WebhookAction
This action allows to set fields for the new webhook before creating it
-
deleteWebhookById
Description copied from interface:IWebhookContainer
Deletes aWebhook
attached to this channel by theid
specified.Possible ErrorResponses include:
ErrorResponse.UNKNOWN_WEBHOOK
The provided id does not refer to a WebHook present in this channel, either due to it not existing or having already been deleted.UNKNOWN_CHANNEL
if this channel was deletedMISSING_ACCESS
if we were removed from the guildMISSING_PERMISSIONS
The send request was attempted after the account lostPermission.MANAGE_WEBHOOKS
in the channel.
- Specified by:
deleteWebhookById
in interfaceIWebhookContainer
- Parameters:
id
- The not-null id for the target Webhook.- Returns:
AuditableRestAction
-