Webhook.from constructor
Webhook.from({
- required dynamic payload,
Implementation
factory Webhook.from ({ required dynamic payload }) {
return Webhook(
payload['id'],
payload['type'],
payload['guild_id'],
payload['channel_id'],
payload['user']['id'],
payload['name'],
payload['avatar'],
payload['token'],
payload['application_id'],
payload['url'],
SourceChannel(payload['source_channel']['id'], payload['source_channel']['name']),
SourceGuild(payload['source_guild']['id'], payload['source_guild']['name'], ImageFormater(payload['source_channel']['icon'], 'icons/${payload['source_guild']['id']}'))
);
}