fix: update refreshAttachmentURL to accept rest parameters for improved flexibility

This commit is contained in:
Elysia
2024-12-29 21:49:29 +07:00
parent 053084d082
commit c1f6f5e78c
2 changed files with 3 additions and 3 deletions

View File

@@ -519,10 +519,10 @@ class Client extends BaseClient {
/**
* Refresh the Discord CDN links with hashes so they can be usable.
* @param {string[]} urls Discord CDN URLs
* @param {...string} urls Discord CDN URLs
* @returns {Promise<Array<{ original: string, refreshed: string }>>}
*/
async refreshAttachmentURL(urls = []) {
async refreshAttachmentURL(...urls) {
// Clean up the URLs
urls = urls.map(url => {
const urlObject = new URL(url);