All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.dv8tion.jda.api.entities.channel.attribute.ICopyableChannel Maven / Gradle / Ivy

Go to download

Java wrapper for the popular chat & VOIP service: Discord https://discord.com

There is a newer version: 5.1.0
Show newest version
/*
 * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package net.dv8tion.jda.api.entities.channel.attribute;

import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.channel.middleman.GuildChannel;
import net.dv8tion.jda.api.requests.restaction.ChannelAction;

import javax.annotation.CheckReturnValue;
import javax.annotation.Nonnull;


/**
 * Represents a GuildChannel that is capable of being copied.
 *
 * 

Please see {@link ICopyableChannel#createCopy()} for information on what is copied. */ public interface ICopyableChannel extends GuildChannel { /** * Creates a copy of the specified {@link GuildChannel GuildChannel} * in the specified {@link net.dv8tion.jda.api.entities.Guild Guild}. *
If the provided target guild is not the same Guild this channel is in then * the parent category and permissions will not be copied due to technical difficulty and ambiguity. * *

This copies the following elements: *

    *
  1. Name
  2. *
  3. Parent Category (if present)
  4. *
  5. Voice Elements (Bitrate, Userlimit)
  6. *
  7. Text Elements (Topic, NSFW, Slowmode)
  8. *
  9. All permission overrides for Members/Roles
  10. *
* *

Possible {@link net.dv8tion.jda.api.requests.ErrorResponse ErrorResponses} caused by * the returned {@link net.dv8tion.jda.api.requests.RestAction RestAction} include the following: *

    *
  • {@link net.dv8tion.jda.api.requests.ErrorResponse#MISSING_PERMISSIONS MISSING_PERMISSIONS} *
    The channel could not be created due to a permission discrepancy
  • * *
  • {@link net.dv8tion.jda.api.requests.ErrorResponse#MISSING_ACCESS MISSING_ACCESS} *
    The {@link net.dv8tion.jda.api.Permission#VIEW_CHANNEL VIEW_CHANNEL} permission was removed
  • *
* * @param guild * The {@link net.dv8tion.jda.api.entities.Guild Guild} to create the channel in * * @throws java.lang.IllegalArgumentException * If the provided guild is {@code null} * @throws net.dv8tion.jda.api.exceptions.PermissionException * If the currently logged in account does not have the {@link net.dv8tion.jda.api.Permission#MANAGE_CHANNEL MANAGE_CHANNEL} Permission * * @return A specific {@link ChannelAction ChannelAction} *
This action allows to set fields for the new GuildChannel before creating it! */ @Nonnull @CheckReturnValue ChannelAction createCopy(@Nonnull Guild guild); /** * Creates a copy of the specified {@link GuildChannel GuildChannel}. * *

This copies the following elements: *

    *
  1. Name
  2. *
  3. Parent Category (if present)
  4. *
  5. Voice Elements (Bitrate, Userlimit)
  6. *
  7. Text Elements (Topic, NSFW, Slowmode)
  8. *
  9. All permission overrides for Members/Roles
  10. *
* *

Possible {@link net.dv8tion.jda.api.requests.ErrorResponse ErrorResponses} caused by * the returned {@link net.dv8tion.jda.api.requests.RestAction RestAction} include the following: *

    *
  • {@link net.dv8tion.jda.api.requests.ErrorResponse#MISSING_PERMISSIONS MISSING_PERMISSIONS} *
    The channel could not be created due to a permission discrepancy
  • * *
  • {@link net.dv8tion.jda.api.requests.ErrorResponse#MISSING_ACCESS MISSING_ACCESS} *
    The {@link net.dv8tion.jda.api.Permission#VIEW_CHANNEL VIEW_CHANNEL} permission was removed
  • *
* * @throws net.dv8tion.jda.api.exceptions.PermissionException * If the currently logged in account does not have the {@link net.dv8tion.jda.api.Permission#MANAGE_CHANNEL MANAGE_CHANNEL} Permission * * @return A specific {@link ChannelAction ChannelAction} *
This action allows to set fields for the new GuildChannel before creating it! */ @Nonnull @CheckReturnValue ChannelAction createCopy(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy