Compare commits

...

2 Commits

Author SHA1 Message Date
Vlad Frangu
05c63cd9a1 chore(rest): release @discordjs/rest@2.4.2 2025-01-02 01:45:37 +02:00
Jiralite
8d69b24b5c fix: correct guild member banner URL 2025-01-01 23:44:32 +00:00
4 changed files with 22 additions and 2 deletions

View File

@@ -2,6 +2,12 @@
All notable changes to this project will be documented in this file.
# [@discordjs/rest@2.4.2](https://github.com/discordjs/discord.js/compare/@discordjs/rest@2.4.1...@discordjs/rest@2.4.2) - (2025-01-01)
## Bug Fixes
- Correct guild member banner URL ([8d69b24](https://github.com/discordjs/discord.js/commit/8d69b24b5c83249dffa5899a417a9dcbc6f3f30c))
# [@discordjs/rest@2.4.0](https://github.com/discordjs/discord.js/compare/@discordjs/rest@2.3.0...@discordjs/rest@2.4.0) - (2024-09-01)
## Bug Fixes

View File

@@ -76,6 +76,20 @@ test('guildMemberAvatar dynamic-not-animated', () => {
expect(cdn.guildMemberAvatar(id, id, hash)).toEqual(`${baseCDN}/guilds/${id}/users/${id}/avatars/${hash}.webp`);
});
test('guildMemberBanner default', () => {
expect(cdn.guildMemberBanner(id, id, hash)).toEqual(`${baseCDN}/guilds/${id}/users/${id}/banners/${hash}.webp`);
});
test('guildMemberBanner dynamic-animated', () => {
expect(cdn.guildMemberBanner(id, id, animatedHash)).toEqual(
`${baseCDN}/guilds/${id}/users/${id}/banners/${animatedHash}.gif`,
);
});
test('guildMemberBanner dynamic-not-animated', () => {
expect(cdn.guildMemberBanner(id, id, hash)).toEqual(`${baseCDN}/guilds/${id}/users/${id}/banners/${hash}.webp`);
});
test('guildScheduledEventCover default', () => {
expect(cdn.guildScheduledEventCover(id, hash)).toEqual(`${baseCDN}/guild-events/${id}/${hash}.webp`);
});

View File

@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@discordjs/rest",
"version": "2.4.1",
"version": "2.4.2",
"description": "The REST API for discord.js",
"scripts": {
"test": "vitest run",

View File

@@ -254,7 +254,7 @@ export class CDN {
bannerHash: string,
options?: Readonly<ImageURLOptions>,
): string {
return this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/banner`, bannerHash, options);
return this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/banners/${bannerHash}`, bannerHash, options);
}
/**