# Creating Channels, Invites, etc.

Javacord provides XyzBuilder classes to create new Discord entities like channels, webhooks, servers, and many more.

# 📕 Create Channels

You can get the channel builders for a specific server using the Server#createXyzChannelBuilder or by directly calling the constructor. Creating a ServerVoiceChannel would look like this:

Server server = ...;
ServerVoiceChannel channel = new ServerVoiceChannelBuilder(server)

# 📗 Create Webhooks

You can get the WebhookBuilder for a specific text channel:

ServerTextChannel channel = ...;
Webhook webhook = new WebhookBuilder(channel)
    .setName("Captain Hook")
    .setAvatar(new File("C:/Users/Bastian/Pictures/puppy.jpg"))

# 📘 Create Invites

You can get the InviteBuilder for a specific server channel:

ServerTextChannel channel = ...;
Invite invite = new InviteBuilder(channel)

# 📙 Create Servers

You can get the ServerBuilder from the current api instance:

DiscordApi api = ...;
long serverId = new ServerBuilder(api)
    .setName("My Awesome Server")


By default, bots can only create servers if they are in less than 10 servers. You can contact the Discord support to request a higher limit.