diff --git a/lib/discordrb/data/webhook.rb b/lib/discordrb/data/webhook.rb index 3c58fd11e..218bb897d 100644 --- a/lib/discordrb/data/webhook.rb +++ b/lib/discordrb/data/webhook.rb @@ -84,9 +84,9 @@ def name=(name) def update(data) # Only pass a value for avatar if the key is defined as sending nil will delete the data[:avatar] = avatarise(data[:avatar]) if data.key?(:avatar) - data[:channel_id] = data[:channel].resolve_id + data[:channel_id] = data[:channel]&.resolve_id data.delete(:channel) - update_webhook(data) + update_webhook(**data) end # Deletes the webhook.