From 913710f2390ca7eef9f1b301a0018eee7f8fbdbd Mon Sep 17 00:00:00 2001 From: advaith Date: Sun, 9 Jun 2024 10:02:02 -0700 Subject: [PATCH] update webhook URLs to v9 (#264) --- lib/discordrb/webhooks/client.rb | 2 +- spec/webhooks_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/discordrb/webhooks/client.rb b/lib/discordrb/webhooks/client.rb index e1ffe7c8d..1978c03c5 100644 --- a/lib/discordrb/webhooks/client.rb +++ b/lib/discordrb/webhooks/client.rb @@ -128,7 +128,7 @@ def post_multipart(builder, components, wait) end def generate_url(id, token) - "https://discord.com/api/v8/webhooks/#{id}/#{token}" + "https://discord.com/api/v9/webhooks/#{id}/#{token}" end end end diff --git a/spec/webhooks_spec.rb b/spec/webhooks_spec.rb index c2505246f..df5966817 100644 --- a/spec/webhooks_spec.rb +++ b/spec/webhooks_spec.rb @@ -94,7 +94,7 @@ client = described_class.new(id: id, token: token) url = client.instance_variable_get(:@url) - expect(url).to eq "https://discord.com/api/v8/webhooks/#{id}/#{token}" + expect(url).to eq "https://discord.com/api/v9/webhooks/#{id}/#{token}" end it 'takes a provided url' do