fromJson static method
Implementation
static Channel fromJson(Map<String, dynamic> json) {
return Channel(
id: json['id'],
type: ChannelType.forValue(json['type']),
guildId: json['guild_id'],
position: json['position'],
permissionOverwrites: fromArray(
Overwrite.fromJson,
json['permission_overwrites'],
),
name: json['name'],
topic: json['topic'],
nsfw: json['nsfw'],
lastMessageId: json['last_message_id'],
bitrate: json['bitrate'],
userLimit: json['user_limit'],
rateLimitPerUser: json['rate_limit_per_user'],
recipients: fromArray(User.fromJson, json['recipients']),
icon: json['icon'],
ownerId: json['owner_id'],
applicationId: json['application_id'],
parentId: json['parent_id'],
lastPinTimestamp: json['last_pin_timestamp'],
);
}