ChannelBuilder.fromTextChannel constructor
ChannelBuilder.fromTextChannel({})
Implementation
factory ChannelBuilder.fromTextChannel ({
String? label,
String? description,
Snowflake? parentId,
int? position,
List<PermissionOverwrite>? permissions,
bool? nsfw,
int? rateLimitPerUser,
}) {
return ChannelBuilder({
'type': ChannelType.guildText.value,
'name': label,
'topic': description,
'parent_id': parentId,
'position': position,
'permission_overwrites': permissions?.map((permission) => permission.toJson()).toList(),
'nsfw': nsfw,
'rate_limit_per_user': rateLimitPerUser
});
}