private void createGuildChannel(GuildImpl guildObj, JSONObject channelData) { final ChannelType channelType = ChannelType.fromId(channelData.getInt("type")); switch (channelType) { case TEXT: createTextChannel(guildObj, channelData, guildObj.getIdLong()); break; case VOICE: createVoiceChannel(guildObj, channelData, guildObj.getIdLong()); break; case CATEGORY: createCategory(guildObj, channelData, guildObj.getIdLong()); break; default: throw new IllegalArgumentException("Cannot create channel for type " + channelData.getInt("type")); } }
ChannelType type = ChannelType.fromId(chan.getInt("type"));
final ChannelType channelType = ChannelType.fromId(channelObject.getInt("type"));
@Override protected Long handleInternally(JSONObject content) ChannelType type = ChannelType.fromId(content.getInt("type")); if (type == ChannelType.GROUP)
@Override protected Long handleInternally(JSONObject content) ChannelType type = ChannelType.fromId(content.getInt("type"));
@Override protected Long handleInternally(JSONObject content) ChannelType type = ChannelType.fromId(content.getInt("type"));