Method: Discordrb::API::Webhook.update_webhook
- Defined in:
- lib/discordrb/api/webhook.rb
.update_webhook(token, webhook_id, data, reason = nil) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/discordrb/api/webhook.rb', line 32 def update_webhook(token, webhook_id, data, reason = nil) Discordrb::API.request( :webhooks_wid, webhook_id, :patch, "#{Discordrb::API.api_base}/webhooks/#{webhook_id}", data.to_json, Authorization: token, content_type: :json, 'X-Audit-Log-Reason': reason ) end |