org.json.JSONString
public static class GuildAction.ChannelData
extends java.lang.Object
implements org.json.JSONString
Channels
within
the construction of a Guild
via GuildAction.
Use with GuildAction.addChannel(ChannelData)
.
Constructor | Description |
---|---|
ChannelData(ChannelType type,
java.lang.String name) |
Modifier and Type | Method | Description |
---|---|---|
GuildAction.ChannelData |
addPermissionOverride(GuildAction.RoleData role,
long allow,
long deny) |
Adds a
PermissionOverride to this channel
with the provided RoleData !
Use GuildAction.newRole() to retrieve an instance of RoleData. |
GuildAction.ChannelData |
addPermissionOverride(GuildAction.RoleData role,
java.util.Collection<Permission> allow,
java.util.Collection<Permission> deny) |
Adds a
PermissionOverride to this channel
with the provided RoleData !
Use GuildAction.newRole() to retrieve an instance of RoleData. |
GuildAction.ChannelData |
setBitrate(java.lang.Integer bitrate) |
Sets the bitrate for this channel.
|
GuildAction.ChannelData |
setNSFW(java.lang.Boolean nsfw) |
Sets the whether this channel should be marked NSFW.
|
GuildAction.ChannelData |
setPosition(java.lang.Integer position) |
Sets the position for this channel.
|
GuildAction.ChannelData |
setTopic(java.lang.String topic) |
Sets the topic for this channel.
|
GuildAction.ChannelData |
setUserlimit(java.lang.Integer userlimit) |
Sets the userlimit for this channel.
|
java.lang.String |
toJSONString() |
public ChannelData(ChannelType type, java.lang.String name)
Channel
to be used in the construction
of a Guild
!type
- The ChannelType
of the resulting Channel
TEXT
or VOICE
!name
- The name of the channel. This must be alphanumeric with underscores for type TEXTjava.lang.IllegalArgumentException
- null
or blankpublic GuildAction.ChannelData setTopic(java.lang.String topic)
TEXT
.topic
- The topic for the channeljava.lang.IllegalArgumentException
- If the provided topic is bigger than 1024 characterspublic GuildAction.ChannelData setNSFW(java.lang.Boolean nsfw)
TEXT
.nsfw
- Whether this channel should be marked NSFWpublic GuildAction.ChannelData setBitrate(java.lang.Integer bitrate)
VOICE
.bitrate
- The bitrate for the channel (8000-96000)java.lang.IllegalArgumentException
- If the provided bitrate is not between 8000-96000public GuildAction.ChannelData setUserlimit(java.lang.Integer userlimit)
VOICE
.userlimit
- The userlimit for the channel (0-99)java.lang.IllegalArgumentException
- If the provided userlimit is not between 0-99public GuildAction.ChannelData setPosition(java.lang.Integer position)
position
- The position for the channelpublic GuildAction.ChannelData addPermissionOverride(GuildAction.RoleData role, long allow, long deny)
PermissionOverride
to this channel
with the provided RoleData
!
GuildAction.newRole()
to retrieve an instance of RoleData.role
- The target roleallow
- The permissions to grant in the overridedeny
- The permissions to deny in the overridejava.lang.IllegalArgumentException
- null
public GuildAction.ChannelData addPermissionOverride(GuildAction.RoleData role, @Nullable java.util.Collection<Permission> allow, @Nullable java.util.Collection<Permission> deny)
PermissionOverride
to this channel
with the provided RoleData
!
GuildAction.newRole()
to retrieve an instance of RoleData.role
- The target roleallow
- The permissions to grant in the overridedeny
- The permissions to deny in the overridejava.lang.IllegalArgumentException
- null
null
public java.lang.String toJSONString()
toJSONString
in interface org.json.JSONString