ChannelBuilder.fromCategoryChannel constructor

ChannelBuilder.fromCategoryChannel({
  1. String? label,
  2. int? position,
  3. List<PermissionOverwrite>? permissions,
})

Implementation

factory ChannelBuilder.fromCategoryChannel ({ String? label, int? position, List<PermissionOverwrite>? permissions }) {
  return ChannelBuilder({
    'type': ChannelType.guildCategory.value,
    'name': label,
    'position': position,
    'permission_overwrites': permissions?.map((permission) => permission.toJson()).toList(),
  });
}