Method: Discordrb::API::Webhook.token_update_webhook

Defined in:
lib/discordrb/api/webhook.rb

.token_update_webhook(webhook_token, webhook_id, data, reason = nil) ⇒ Object



47
48
49
50
51
52
53
54
55
56
57
# File 'lib/discordrb/api/webhook.rb', line 47

def token_update_webhook(webhook_token, webhook_id, data, reason = nil)
  Discordrb::API.request(
    :webhooks_wid,
    webhook_id,
    :patch,
    "#{Discordrb::API.api_base}/webhooks/#{webhook_id}/#{webhook_token}",
    data.to_json,
    content_type: :json,
    'X-Audit-Log-Reason': reason
  )
end