ChannelBuilder.fromVoiceChannel constructor

ChannelBuilder.fromVoiceChannel({
  1. String? label,
  2. Snowflake? parentId,
  3. int? position,
  4. List<PermissionOverwrite>? permissions,
  5. bool? nsfw,
  6. int? bitrate,
  7. int? userLimit,
  8. String? rtcRegion,
  9. int? videoQualityMode,
})

Implementation

factory ChannelBuilder.fromVoiceChannel ({
  String? label,
  Snowflake? parentId,
  int? position,
  List<PermissionOverwrite>? permissions,
  bool? nsfw,
  int? bitrate,
  int? userLimit,
  String? rtcRegion,
  int? videoQualityMode,
}) {
  return ChannelBuilder({
    'type': ChannelType.guildVoice.value,
    'name': label,
    'parent_id': parentId,
    'position': position,
    'permission_overwrites': permissions?.map((permission) => permission.toJson()).toList(),
    'nsfw': nsfw,
    'bitrate': bitrate,
    'user_limit': userLimit,
    'rtc_region': rtcRegion,
    'video_quality_mode': videoQualityMode
  });
}